当应用程序在后台或被杀时,GCM支持ios应用程序 [英] GCM support for ios application when application in background or killed

查看:125
本文介绍了当应用程序在后台或被杀时,GCM支持ios应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在使用以下链接在iOS应用程序中整合GCM

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



我在配置文件在定义的步骤。

我也成功地获得通知,但问题是我没有得到通知,当应用程序被杀害或在background.Is那里任何实现获取通知的背景或杀害ios应用程序,因为我已经搜索了很多,没有发现富有成果。

所以任何帮助将不胜感激谢谢..

p>

解决方案

我有同样的问题,后来我发布了详细的问题。幸运的是,我发现了这个问题,现在它正在为我工​​作。我没有发送适当格式的数据,这些格式在我以适当的格式发送数据后正常工作。我的JSON格式看起来像这样。

  {
通知:{
徽章:12,
alert:default,
sound:default,
title:default
},
content_available:true,
to:YOUR_KEY_HERE
}

由于没有可用的详细信息你的服务器实现。你可以参考我的问题获取更多信息。



GCM将内容推送到iOS的通知(无法从非活动状态调用)


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..

解决方案

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)

这篇关于当应用程序在后台或被杀时,GCM支持ios应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆