We are using FCM to send remote notifications for both iOS and Android. The following are the payloads we are sending from the backend.
options = {
noti
Below payload can be used as a common payload for android and iOS. "score" is just a dummy keyword for explanation and you can add more but all the values should be in String.
{
priority: "high",
tokens: [tokens],
data: {
title: ,
body: , <-- this data will be used by the android
score: 345.
},
apns: {
headers: {
"apns-priority": "10"
},
payload: {
aps: { <-- payload for iOS
alert: {
title: ,
body:
},
data:{
score: 345
}
}
}
}
}
In the above payload,