I'm trying to send a notification to my device using the apns key as described here: https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#ApnsConfig.
The push notification does arrive, but the title is not overridden. When I omit the notification key, the notification is only send (in the background) when I add the content_available: true option.
This is what my body looks like:
{
"to" : <TOKEN>,
"apns" : {
"payload" : {
"aps" : {
"alert" : "Does not work",
"badge" : 1,
"sound" : "bingbong.aiff"
}
}
}
"notification" : {
"body" : "Works"
}
}
Whatever combination I try, it looks like Firebase is ignoring the apns key. What am I doing wrong?
You are using legacy API for sending push notifications (not V1). Legacy API doesn't support extra keys like Android or APNs.
So you have two options here:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With