GCM注册成功在iPhone上,但不是iPad [英] GCM registration successful on iphone but not ipad

查看:168
本文介绍了GCM注册成功在iPhone上,但不是iPad的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have a weird issue where I receive the following error only on an ipad device:

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

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

During the GCM registration process to request a gcm token. i.e.

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

我正在关注示例。 iPhone上的同样的过程工作得很好。我不确定这两款设备之间有什么区别,以及为什么GCM拒绝在iPad上注册。这两个设备目前正在运行iOS 9.3.1。

I'm following the example to the letter. The same process works just fine on an iphone. I'm not sure what the difference between the two devices are and why GCM refuses to register on the ipad. Both devices are currently running iOS 9.3.1.

头文件表明这个错误对应于:

The header file indicates that this error corresponds to:

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

然而,我不确定这意味着什么。为什么iPad会丢失一个设备ID,但iPhone是好的?

However, I'm not sure exactly what that means. Why would the iPad be missing a deviceID, but the iphone is OK?

如果任何人有任何想法,为什么会发生这种情况,可以分享一些洞察力,我会很大感谢!

If anyone has any ideas on why this is happening and can share some insight, I'd greatly appreciate it.

谢谢!

推荐答案

到Google最近推荐的Firebase。一切按预期工作。

In the end we transitioned to Firebase as recommended by Google recently. Everything worked as expected.

这篇关于GCM注册成功在iPhone上,但不是iPad的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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