Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FCM custom notification for ios

I know this question have been ask a lot of time in android but not ios. So I already test out push notification with FCM it work fine. Mine problem is wether it's a way to create custom notification rather than letting the system to handle the notification with the notification payload?

like image 796
teck wei Avatar asked Oct 29 '22 15:10

teck wei


1 Answers

-Users can send data messages with FCM.What you have to send is,

Sample PostMan Json data:

{ "data": {
    "any key": "any value",
    "any key 2": "any value 2"
  },
  "to" : "token received to mobile from FCM"
}

Payload inside "data" can change according to the requirement.

Mobile end:

application(_:didReceiveRemoteNotification:) override method will get fire.So it is unto developer to extract data from the userInfo property in iOS and use it.

like image 176
ireshika piyumalie Avatar answered Nov 13 '22 20:11

ireshika piyumalie