“Invalid Token” while sending PushKit notification

2019-09-17 15:56发布

Im trying to send VoIP notifications via PushKit, but in Production(Distribution) environment, I get "Invalid Token" from server.

everything works fine in development env with same certificate and url:ssl://gateway.sandbox.push.apple.com with port:2195 but when i change the url to:ssl://gateway.push.apple.com, I get "Invalid Token" error with no extra data

1条回答
Deceive 欺骗
2楼-- · 2019-09-17 16:37

Looks like you are using same Voip device token generated by Client in sandbox environment for both sandbox as well as production. That's the reason you will get invalid token error.

This will not work. If you want to use production environment, you need to make sure your client/app is creating device token in production environment. (You can not use device token generated by client using Sandbox when your server is using production environment)

Pl. note separate device tokens are generated for sandbox/production environment for the same app/client on the same device. Hope it helps.

查看更多
登录 后发表回答