且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

APNS:无效令牌 (8)

更新时间:2023-11-27 23:39:16

最可能的解释是您正在向生产 APNS 服务器发送带有沙盒设备令牌的推送通知.

The most likely explanation is that you are sending a push notification with a sandbox device token to the production APNS server.

您使用的是在沙盒环境中测试时由您的应用发送到您服务器的旧设备令牌,或者您的应用仍然使用开发配置文件进行签名,并且仍然从以下位置接收沙盒设备令牌APNS 服务.

Either you are using an old device token that was sent to your server by your app while you were testing it in the sandbox environment, or your app is still signed with a development provisioning profile, and is still receiving sandbox device tokens from the APNS service.

我的回答假设您使用的是源自 APN 服务的设备令牌,而不是您自己创建的一些虚拟令牌.

My answer assumes that you are using a device token that originated from the APN service, and not some dummy token you created yourself .

我建议您检查配置文件以查看为 aps 权利显示的值.我还建议您从任何旧设备令牌中清除您的数据库.

I suggest you check the provisioning profile to see what value appear for the aps entitlement. I also suggest you clear your db from any old device tokens.