简体   繁体   English

iOS未收到GCM推送通知

[英]IOS not receiving GCM push notifications

I have a project build by swift in xcode 7 and i apply gcm to my project. 我在xcode 7中通过swift建立了一个项目,并将gcm应用于我的项目。 I just received data from gcm but not showing alert notification in my ios devices. 我刚从gcm接收到数据,但未在ios设备中显示警报通知。 My AppDelegate 我的AppDelegate

I've encountered something similar. 我遇到过类似的事情。 The reason mine wasn't working was because of the kGGLInstanceIDAPNSServerTypeSandboxOption value. 我的行不通的原因是由于kGGLInstanceIDAPNSServerTypeSandboxOption值。 I had to set it to true for debug builds and false for distribution builds. 对于调试版本,我必须将其设置为true ;对于分发版本,则必须将其设置为false

You're posting an NSNotificationCenter type of notification, thats not something the user sees, its not an alert notification which the user can see. 您要发布NSNotificationCenter通知类型,这不是用户看到的内容,也不是用户可以看到的警报通知。 You want UILocalNotification 您想要UILocalNotification

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM