GCM在iphone上注册成功但不是ipad

时间:2016-04-06 23:47:10

标签: ios iphone ipad google-cloud-messaging

我有一个奇怪的问题,我只在ipad设备上收到以下错误:

The operation couldn’t be completed. (com.google.iid error 501.)

在GCM注册过程中请求gcm令牌。即。

GGLInstanceID.sharedInstance().tokenWithAuthorizedEntity(gcmSenderID,
                                            scope: kGGLInstanceIDScopeGCM,
                                          options: gcmRegistrationOptions,
                                          handler: gcmRegistrationHandler)

我正在关注the example信。同样的过程在iPhone上运行得很好。我不确定这两个设备之间的区别是什么以及为什么GCM拒绝在ipad上注册。这两款设备目前都在运行iOS 9.3.1。

头文件表示此错误对应于:

// Device seems to be missing a valid deviceID. Cannot
// authenticate device requests.
kGGLInstanceIDOperationErrorCodeMissingDeviceID = 501,

但是,我不确定这意味着什么。为什么iPad会丢失一个deviceID,但iphone还行吗?

如果有人对于为什么会这样做有任何想法并且可以分享一些见解,我会非常感激。

谢谢!

1 个答案:

答案 0 :(得分:0)

最后,我们最近按照谷歌的建议转换到了Firebase。一切都按预期工作。