简体   繁体   English

使用iOS分布式应用时,Google Cloud Messaging会显示“notRegistered”

[英]Google Cloud Messaging shows “notRegistered” when using iOS distributed app

I have implemented a GCM service on an iOS app. 我在iOS应用程序上实现了GCM服务。 I use PHP to send GCM at the server. 我使用PHP在服务器上发送GCM。 It works perfectly when the app is signed by a development provisioning profile. 当应用程序由开发配置文件签名时,它可以很好地工作。

That is, when the app registers itself using the GCM Config, it always returns a functioning device token. 也就是说,当应用程序使用GCM Config注册自身时,它总是返回一个正常运行的设备令牌。 I can send a notification to the device using the token without any error. 我可以使用令牌向设备发送通知,而不会出现任何错误。

But after I sign the app by distributed provisioning profile and test the app by TestFlight or Ad Hoc Provisioning, I received a "Not Registered" error. 但在我通过分布式配置文件签署应用程序并通过TestFlight或Ad Hoc Provisioning测试应用程序后,我收到了“未注册”错误。

{"multicast_id":8921098464640731057,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"NotRegistered"}]}" { “multicast_id”:8921098464640731057, “成功”:0, “失败”:1, “canonical_ids”:0 “结果”:[{ “错误”: “NotRegistered”}]}”

How does it happen? 怎么会发生? Any Solution? 任何方案? I have checked that I enabled APNS in both development and distribution provisioning profile. 我已经检查过我在开发和分发配置文件中启用了APNS。

I did not enable TLS on my server. 我没有在我的服务器上启用TLS。 Actually my SSL Cert is not ready so I can't test it. 实际上我的SSL证书还没有准备好,所以我无法测试它。 Is this the reason? 这是什么原因?

Are you setting the kGGLInstanceIDAPNSServerTypeSandboxOption to NO when you build your app for Distribution? 在为分发构建应用程序时,是否将kGGLInstanceIDAPNSServerTypeSandboxOption设置为NO

Your APNS token is being rejected by APNS server and that's when GCM unregisters the GCM registration token for your app and you start seeing the NotRegistered error. 您的APNS令牌被APNS服务器拒绝,并且当GCM取消注册您的应用程序的GCM注册令牌并且您开始看到NotRegistered错误时。

Here is the documentation for the flag. 这是该标志的文档

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

相关问题 即使从Google Cloud Messaging中的设备上卸载了应用程序,也没有收到Google的“未注册”响应 - Not getting “NotRegistered” response from Google even after uninstalling app from device in Google Cloud Messaging Google Cloud Messaging-当应用未运行时能正常工作吗 - Google Cloud Messaging - Will it work when app is not running 卸载应用后,Google GCM不会返回错误代码“ NotRegistered” - Google GCM not returning error code “NotRegistered” when app was uninstalled 带有Google Cloud Messaging的App Engine - App Engine with Google Cloud Messaging 使用Cordova插件进行Google Cloud Messaging IOS注册 - Google Cloud Messaging IOS registration using Cordova plugins 在Google Cloud Messaging中注册应用 - Registering an app with Google Cloud Messaging 使用php的iOS的苹果推送通知和android的google cloud消息传递? - apple push notification for iOS and google cloud messaging for android using php? 使用PHP中的Google Cloud Messaging将通知发送到IOS和Android - Sending Notification To IOS And Android using Google Cloud Messaging in PHP 使用XMPP服务器和Google云消息传递(或更新的Firebase云消息传递)进行推送通知的Android应用程序App - Chat App for Android using a XMPP Server and Google Cloud Messaging (or the newer Firebase Cloud Messaging) for Push Notifications 何时注册Google Cloud Messaging? - When to register Google Cloud Messaging?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM