i am not able to receive notifications in iOS when the application is not in foreground, GCM says that the message has been delivered but APNS does not send the notification to iOS. When application is in foreground all works perfectly.
I have already configured in Google API console the GCM API so i have the credentials (server-key to delivery and project id (senderid) for the app).
I am following the documentation for GCM 3.0 using the example app.
I send a regular GCM message with the data field in the payload.
The JSON i send is:
{
"collapse_key":"my_collapse_key",
"delay_while_idle":false,
"data":{
"message":"hi+iOS",
"nRef":"a8e158b4b67b69171a3365417ed3ccba15d8a333",
"ts":"1434439237277",
"nId":"814d84630456b4dd1e2df528f1353374ed2b1567"
},
"registration_ids":[
"my_token_reg_id"
]
}
I am using a created configuration profile (plist), as google asks, for the iOS app that has only the development certificate.
Thanks.