217
Views
44
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 asset by OutSystems
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

UserImage.jpg
Ricardo Silva
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!

2023-09-11 07-19-28
Yongky Saputra

Thank you Ricardo

UserImage.jpg
Maurilio Junior

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?

2024-05-28 00-11-35
Luis Andrés Jara Vásquez

Hi Ricardo, thanks, but
This problem continues with Mabs10 and with the plugin version 4.2.0, so this problem is not resolved yet


Android works perfect:

-The push arrives and opens the application

-Deplink arrives and i can use to redirect


iOS not perfect:

-The push arrives and opens the application

-The Deplink does not arrive

i'm using Postman for to send Push
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
https://fcm.googleapis.com/v1/projects/*MyProyect*/messages:send 

{

    "message":{

       "topic": "TST",

       "notification":{

         "body":"This is an FCM notification message!!!",

         "title":"FCM Message"

        },

        "data": {

            "DeepLink": "Admindashboard"

        }

    }

}



UserImage.jpg
Ricardo Silva

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!

2023-09-11 07-19-28
Yongky Saputra

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

UserImage.jpg
Wictor Batista

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

2023-09-11 07-19-28
Yongky Saputra

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

2025-06-07 16-46-54
Victor Abreu

I have the same problem, can anyone help?

UserImage.jpg
Ricardo Silva

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!

2023-09-11 07-19-28
Yongky Saputra

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

UserImage.jpg
Maurilio Junior

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?

UserImage.jpg
Wictor Batista

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

UserImage.jpg
Maurilio Junior
UserImage.jpg
Ricardo Silva

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.

2023-09-11 07-19-28
Yongky Saputra

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?


UserImage.jpg
Ricardo Silva

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

2023-09-11 07-19-28
Yongky Saputra


For the cloud messaging configurator im using this version

For the cloud messaging plugin im using this version

UserImage.jpg
Ricardo Silva

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?

2023-09-11 07-19-28
Yongky Saputra

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

UserImage.jpg
Ricardo Silva

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?

2023-09-11 07-19-28
Yongky Saputra

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

UserImage.jpg
Kenneth Jay Julianda

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

2023-09-11 07-19-28
Yongky Saputra

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

UserImage.jpg
Kenneth Jay Julianda

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

2023-09-11 07-19-28
Yongky Saputra

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

2023-09-11 07-19-28
Yongky Saputra

you tried to send sound in the notification in ios?

UserImage.jpg
Kenneth Jay Julianda

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

2023-09-11 07-19-28
Yongky Saputra

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.

UserImage.jpg
Ricardo Silva

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.

2023-09-11 07-19-28
Yongky Saputra

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

Thank you so much

UserImage.jpg
Kenneth Jay Julianda

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.

UserImage.jpg
Ricardo Silva

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!

UserImage.jpg
Kenneth Jay Julianda

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).

2023-09-11 07-19-28
Yongky Saputra

Hi @Ricardo Moreira da Silva,

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

Thankyou

2023-09-11 07-19-28
Yongky Saputra

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.

2023-09-11 07-19-28
Yongky Saputra

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 

UserImage.jpg
Ricardo Silva

Hey Yongky,

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

Thanks!

UserImage.jpg
Ricardo Silva

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.

2023-09-11 07-19-28
Yongky Saputra

okay ricardo thank  you so much for the information

2023-09-11 07-19-28
Yongky Saputra

okay ricardo thank  you so much for the information

2023-09-11 07-19-28
Yongky Saputra

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.

2021-05-25 20-26-04
Bernardo Condé

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

UserImage.jpg
Ricardo Silva
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!

2023-09-11 07-19-28
Yongky Saputra

Thank you Ricardo

UserImage.jpg
Maurilio Junior

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?

2024-05-28 00-11-35
Luis Andrés Jara Vásquez

Hi Ricardo, thanks, but
This problem continues with Mabs10 and with the plugin version 4.2.0, so this problem is not resolved yet


Android works perfect:

-The push arrives and opens the application

-Deplink arrives and i can use to redirect


iOS not perfect:

-The push arrives and opens the application

-The Deplink does not arrive

i'm using Postman for to send Push
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
https://fcm.googleapis.com/v1/projects/*MyProyect*/messages:send 

{

    "message":{

       "topic": "TST",

       "notification":{

         "body":"This is an FCM notification message!!!",

         "title":"FCM Message"

        },

        "data": {

            "DeepLink": "Admindashboard"

        }

    }

}



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