在ios9中,GCM注册尚未准备好使用auth凭据 [英] GCM registration is not ready with auth credentials in ios9
问题描述
您好我正在使用GCM进行推送通知,它在 iOS8
中工作正常,但在 iOS9
中它正在给出错误GCM注册未准备好使用 iOS9
中的身份验证凭据并且无法连接到GCM:操作无法完成。 (com.google.gcm错误501。)
Hi i am using GCM for push notification, it is working fine in iOS8
but in iOS9
it is giving error "GCM registration is not ready with auth credentials in iOS9
" and could not connect to GCM: The operation couldn’t be completed. (com.google.gcm error 501.)
推荐答案
在使用生产证书签署应用程序后,我遇到了同样的问题。
I had the same issue, after signing the app using a production certificate.
再次使用它的步骤是(这适用于9.2和9.3设备):
And the steps to make it work again are (this worked on 9.2 and 9.3 devices):
- 放回
kGGLInstanceIDAPNSServerTypeSandboxOption:@YES
(生产需要此为否) - 在构建设置/代码下签名/代码签名身份使用链接GCM项目的iPhone Distribution(com.xxxx.yyy)和Provisioning Profile,从Automatic更改回iOS Team Provisioning Profile:com.xxxx.yyy
- Put back
kGGLInstanceIDAPNSServerTypeSandboxOption:@YES
(production needs this to be NO) - Under "build settings/Code Signing/Code signing identity" use the iPhone Distribution linked the GCM project (com.xxxx.yyy) and for Provisioning Profile, change back from Automatic to iOS Team Provisioning Profile:com.xxxx.yyy
构建,运行并等待几分钟。对于其中一项测试,注册需要15分钟。
Build, run, and wait a few minutes. For one of the tests, it took 15 minutes to register.
这篇关于在ios9中,GCM注册尚未准备好使用auth凭据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!