How can we add image in notification in iOS project made in Xamarin forms using FCM.

kapilRajkapilRaj INMember ✭✭

Hello everyone,
I am new to use Xamarin technology.
I have implemented FCM in iOS project. When I send notification using notification tag I receive notification in both background and foreground but when I send notification using data tag with content-available "true" I only receive notification while debugging the app. I am not getting notification once I disconnect the Iphone from mac.
Apart from this I want to add image in notification by sending image link in key value pair using data tag.
Please help me if some one has the solution for my problem.

Best Answer

  • DarioOrgazDarioOrgaz US ✭✭
    Accepted Answer

    Hi,

    For your first problem check your provisioning profiles and the way you start your services.

    For the second one, I had problems in the past with FCM with images. For that reason I am using OneSignal. You can send images very easy.

Answers

  • DarioOrgazDarioOrgaz USMember ✭✭
    Accepted Answer

    Hi,

    For your first problem check your provisioning profiles and the way you start your services.

    For the second one, I had problems in the past with FCM with images. For that reason I am using OneSignal. You can send images very easy.

  • kapilRajkapilRaj INMember ✭✭

    Hello,
    Thank you so much @DarioOrgaz .
    I have used OneSignal and got the image in notification.
    But there is one new issue in my project, I am getting notification with image only when app is in background.
    When I close the app from recent apps and then I am not able to receive notification with image, and also when app is open I am getting popup in which notification title and body are shown, no image is shown in that popup.

  • DarioOrgazDarioOrgaz USMember ✭✭

    @kapilRaj
    It's rare. Check onesignal configuration and how to receive the events. Maybe something it's wrong.

  • kapilRajkapilRaj INMember ✭✭

    Okay Thanks.

Sign In or Register to comment.