Open aozbayra opened 9 years ago
great question @aozbayra i'll investigate
I'm not using this gem specifically, but we recently did this at work (using the PushKit Framework, if that's useful to you).
First of all, content_available
has to be a boolean, as in
{
"content_available": true
}
and not
{
"content_available": "true"
}
which would result in an error message from the GCM servers.
Also, if you want your app to be woken up, even if the app was force quitted or after a device restart, the priority of the GCM notification has to be "high"
(which corresponds to iOS' 10
priority). I'm not sure what you have to do on the app side to make this possible, I'd have to ask the developer who implemented this.
I am using this gem to set up my iOS app receive notifications from GCM. My app does indeed receive notifications when its active(on the foreground), however when its not active, it does not receive anything unless I make it active again. From what I read through multiple sources, I must send a this key value pair within my JSON post request: "content_available" : "true" but when I do so I receive an internal server error although I have the APNs certificate. Any thought on why this gem is not working when my app is on background and its indeed working when its active?