GCM support for ios application when application in background or killed

二次信任 提交于 2019-12-17 20:14:20

问题


Hello all i am integrating GCM in iOS application using following link

https://developers.google.com/cloud-messaging/ios/start.

I have also uploaded the certificates when configuring the file on defined steps.

I have also succeeded for getting notification,but the problem is that i am not getting the notification when the application is killed or in background.Is there any implementation for getting notification in background or killed ios application as i have searched a lot for that and nothing found fruitful.

So any help will be appreciated Thanks..


回答1:


I had same problem and I posted detailed question later. Luckily, I figured out the problem and it is working for me now. I was not sending data in proper format that got working after I sent data in proper format. My JSON format looks like this.

{
"notification":{
"badge":"12",
"alert":"default",
"sound":"default",
"title":"default"
},
"content_available":true,
"to":"YOUR_KEY_HERE"
}

Since there isn't details available on your sever implementation. you can refer my question for more information.

GCM push notification to iOS with content_available (not working to invoke from inactive state)



来源:https://stackoverflow.com/questions/30883607/gcm-support-for-ios-application-when-application-in-background-or-killed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!