【问题标题】:IOS not receiving GCM push notificationsIOS 没有收到 GCM 推送通知
【发布时间】:2016-05-04 03:30:24
【问题描述】:

我在 xcode 7 中有一个由 swift 构建的项目,我将 gcm 应用于我的项目。我刚刚收到来自 gcm 的数据,但没有在我的 ios 设备中显示警报通知。 My AppDelegate

【问题讨论】:

标签: ios swift push-notification google-cloud-messaging


【解决方案1】:

我遇到过类似的事情。我的不工作的原因是kGGLInstanceIDAPNSServerTypeSandboxOption 值。对于调试版本,我必须将其设置为 true,对于分发版本,我必须将其设置为 false

【讨论】:

    【解决方案2】:

    您发布的是 NSNotificationCenter 类型的通知,这不是用户看到的内容,也不是用户可以看到的警报通知。你想要 UILocalNotification

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-10-22
      • 1970-01-01
      • 2012-10-27
      • 1970-01-01
      • 1970-01-01
      • 2020-05-25
      • 1970-01-01
      相关资源
      最近更新 更多