108
Views
43
Comments
Solved
[Cloud Messaging Plugin (Firebase)] How to push notification with deeplink in IOS and handle notification on click
cloud-messaging-plugin-firebase
Mobile icon
Forge component by Hector Gordin
Application Type
Mobile
Service Studio Version
11.54.13 (Build 62526)

Hi everyone,

Im trying to push notification in IOS with deeplink using cloud messaging plugin and i also passing some extra data.

This is how i add the deep link to the build internal deep link action


and for handling the notification click action im using this block.

in Android its worked fine, but in IOS i dont get the screen name and the parameter list.

Anyone know how to push notification with deep link in IOS and Handle the notification on click.


It will be a pleasure if someone help.

Thank you

Solution

Hey Yongky (and everyone else involved),

Just like to inform you that there's a new Firebase Cloud Messaging version available on Forge that you can try out: v3.0.0.

Best regards!

Thank you Ricardo

Hi Ricardo,

We've tried to use the Cloud Messaging in this newer version and at least for us the problem still the same, even after changing the way we consume the google services .plist and .json. Do you have any idea of what could be happening?

Hey Yongky Saputra,

You mentioned you added the `NotificationsHandler` block to handle the notification click action (which is correct) but you didn't share how you're reacting to the events triggered (DefaultNotificationReceived, InternalRouteActionClicked, ...). Do you mind sharing it?

Also, did you have a look on how it's implemented on the Demo app that was released along with the plugin?

Thanks!

Hi Ricardo Silva, I add the block notification handler to my layout and create a client action to handle the event, event i used is notification clicked. i also tried DefaultNotificationReceived and InternalRouteActionClicked but still not work for IOS.

In android worked fine.

Thank youu

I have the same problem, did you find the solution?

Right now still not get the solution, i already contact the outsystems support for this case

I have the same problem, can anyone help?

Hey Yongky Saputra,

Thanks for sharing more information. 

In order to understand the problem better, I have some more questions, if it's ok. Are you using Forge's Cloud Messaging Configurator to trigger the Push Notification? If so, which REST POST method are you using?

Thanks!

yes im using api from cloud messaging configurator, i used send notification user.

Hi everyone,

I'm having the same problem with this plugin, does anyone have the solution to this problem? I'm using the firebase console to send the pushes notifications, could this be the reason why the redirect is not working?

But, the redirect working in Android with you too? Case afirmative, i believe send by firebase console is not a problem.

Hey guys!

Thanks for sharing your inputs.

After analysing the issue, there's indeed an issue with the iOS implementation that will imply a fix.

As a workaround, can you try the following to see if it works? On the POST payload, inside the "Notification" structure, could you had a "Sound" property and some value? (the value can be some dummy value).

Please let us know if it unblocks you for now.

Thanks.

Hi Ricardo,

Do you mean i should add 1 more Attribute to the notification structure and send dummy data on it when i hit the API?


Now that you shared that image, I have a new question: which version of the Configurator are you using?


For the cloud messaging configurator im using this version

For the cloud messaging plugin im using this version

Looking at the right side of the image shared, it appears that you're using a customised version of the Configurator. From which version is this based on?

before i was install version 1.1.0 but i think i have configure it and publish so the version become diffrent now.

I asked because the following image (shared by you) looks to be released with the old version of the Configurator:

If you update the Configurator to the latest version, you should be seeing some like this, correct?

Thank you Ricardo, i will try to install the new version of cloud messaging configurator and try to send notification with sound like you say.

If it works i will let you know. 

Thankyou so much Ricardo

 Dit it work ? I am having the same issue with iOS.

i have not try it right now, maybe you can try the solution if it work please inform me. thank you

Tried the solution suggested by the OS Staff and it did not work.

Hi Ricardo Silva, do you have other solution ? because kenneth already doing the solution that you suggested.

you tried to send sound in the notification in ios?

Yes I tried. I tried changing the payload as well base on the FCM and APN documentation. No luck. 

i have try many ways too but still not working untill now. hope OS Staff can find us solution because many application that use deep link in ios.

A fix is already being worked on and hopefully will be available soon. Still, the workaround provided should work but maybe there's something else missing. 

Is it possible to provide more information, namely:

- Endpoint used for triggering the Push Notification;

- An example of the non working payload;

- How the plugin's event handler is being used.

- Anything else you find relevant.

Thanks.

Thankyou Ricardo silva, i will waiting for the next information about the update for this plugin Cloud Messaging Plugin.

Thank you so much

Payload is like this and working fine on android.


{

  "condition": "'Match 17164' in topic",

  "content_available": true,

  "data": {

    "Key1": "Value1",

    "deepLink": "ViewDTR",

    "notification": {

      "title": "Test",

      "body": "Test",

      "sound": "test"

    }

  }

}
Added the notification handler block on the layout and this is the action. The screen name and parameter list is empty on iOS Though we are receiving the notifications.

Hello Kenneth,

Are you sure that the payload works for Android? By looking at it, it's possible to identify a couple of things that would make Firebase not able to read it, such as:

  • the keyword on "condition" should be "topics" instead of "topic";
  • the topic you're trying to find has a " " on it which, according to the Official Firebase documentation, shouldn't work.

Best regards!

My bad. This is an edited version of our payload. I'm sure the payload we are using is working because we have deployed our app in production (Android only).

Hi @Ricardo Moreira da Silva,

Do you have any update for this case? or its still on working?

Thankyou

Hi Ricardo Silva,

This work i get the deep link, but the notification not show in IOS when the application is closed or not open. but when i open the application i can get the notification.

Do you know why when the application is closed i cannot get the notification in IOS. but this worked fine in android.

I think the issue is in this assign. i get the deeplink but the notification dont show when the app is closed. can you help me?


Thank you ricardo.

Hi Ricardo here the json i send in notification v1 and v2.

V2 work deeplink but not show in app background, when i closed the application the notification not show (IOS).

V1 deeplink not work in (IOS), but when app in background or closed i still get the notification.



1. JSON V2

{

    "content_available":true,

    "registration_ids":

        [

            "fOGkGvW4OEhLji3-5hmozi:APA91bHxXfTZB7VbtiNa7aO3GswIPnmaM_j4hIacH9M7z156habhQMzrL1_xiHuGJ8OR_2qAQuNLCJ9eAbCFIc4whZXgOYs3s2cvqcIkFmNAXUG1hTh3wDv2ZSPtWjRou7J6M_hwfh5p",

            "f_AEUA3ORJedcsQK2gVg05:APA91bFlEU7p-Is9y6poD5AbGKd-lj0IyF804bnUxa_70YZXhv6ikUn5FlVnqmS_zrDxdWrwkggTPRdmebL_z5rPV0FQ3qCTVW8ZkOb8Xc5DPxgR6B-5qH46LL89EpIOzjV2J12howH9"

        ],

    "data" : 

        {

            "deepLink":"DetailUser?UserId=xx",

            "notification" : 

                {

                    "title":"Veronika",

                    "body":"Click here Veronika",

                    "sound":"TEST"

                }

        }

}




2. JSON V1

{

    "notification":

        {

            "title":"Veronika",

            "body":"Click here Veronika"

        },

    "registration_ids":

        [

            "fOGkGvW4OEhLji3-5hmozi:APA91bHxXfTZB7VbtiNa7aO3GswIPnmaM_j4hIacH9M7z156habhQMzrL1_xiHuGJ8OR_2qAQuNLCJ9eAbCFIc4whZXgOYs3s2cvqcIkFmNAXUG1hTh3wDv2ZSPtWjRou7J6M_hwfh5p",

            "f_AEUA3ORJedcsQK2gVg05:APA91bFlEU7p-Is9y6poD5AbGKd-lj0IyF804bnUxa_70YZXhv6ikUn5FlVnqmS_zrDxdWrwkggTPRdmebL_z5rPV0FQ3qCTVW8ZkOb8Xc5DPxgR6B-5qH46LL89EpIOzjV2J12howH9"

        ],

    "data" : 

        {

            "deepLink":"DetailUser?UserId=xx"

        }

}


Hope you can help @Ricardo Moreira da Silva 

Hey Yongky,

It's still being worked on. I advise you to keep an eye on Forge. 

Thanks!

Hey Yongky,

The issue you mentioned regarding the V1 it's what we identified as the issue that we're working on.

Regarding the "notification not showing while the app is not in the foreground", it's more related to how iOS treats the notification, being a bit out of our control. Still, when we release the new version with the aforementioned issue fixed, this behaviour will also be addressed.

Thank you for your time.

okay ricardo thank  you so much for the information

okay ricardo thank  you so much for the information

oh because i try to use v2 version and insert sound in it. then the i dont get the notification in IOS but if use v1 i can get the push notification in IOS. so i thought it was because the plugin wrong.

I have the same problem, did you find the solution?

Solution

Hey Yongky (and everyone else involved),

Just like to inform you that there's a new Firebase Cloud Messaging version available on Forge that you can try out: v3.0.0.

Best regards!

Thank you Ricardo

Hi Ricardo,

We've tried to use the Cloud Messaging in this newer version and at least for us the problem still the same, even after changing the way we consume the google services .plist and .json. Do you have any idea of what could be happening?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.