Issues sending silent push notifications to iOS using FCM

388 views
Skip to first unread message

Isaac Halvorson

unread,
Oct 31, 2017, 4:17:15 PM10/31/17
to Firebase Google Group
I'm having issues with silent push notifications on iOS. Strangely, things were working as expected on Friday, but now are not.

This is the JSON we've been sending in the HTTP request to FCM (working on Friday, not working today):

{
   
"to": "<firebase token>",
   
"content_available": true
}

Based on this StackOverflow post, I tried adding the sound property like this:

{
   
"to": "<firebase token>",
   
"content_available": true,
   
"notification": {
       
"sound": ""
   
}
}

For some reason, that works to trigger a silent push notification to the iPhone.

For context, these things do work as expected:
  • Sending non-silent notifications via Firebase
  • Sending silent and non-silent notifications directly via APNs
These things do not work:
  • Adding the `data` or `priority` properties to the request
Does anyone have any insight into what's going on? It seems that the breakdown happens somewhere between Firebase receiving the notification and attempting to send it to APNs, but I don't know how to debug that.

Arthur Thompson

unread,
Nov 1, 2017, 2:57:42 PM11/1/17
to Firebase Google Group
Hi Issac,

Just to be clear and be sure that I understand your issue:


{
 
"to": "<firebase token>",
 
"content_available": true
}

the above worked before but is not working now?

That payload looks good to me, so I'm going to try to reproduce it. Also from the Apple docs:

In your payload, make sure the following conditions are true:

The payload’s aps dictionary must include the content-available key with a value of 1.
The payload’s aps dictionary must not contain the alert, sound, or badge keys.

Your original payload should work so no need to change it.
Reply all
Reply to author
Forward
0 new messages