简体   繁体   English

推送通知仅在开发时起作用,而在生产时不起作用

[英]Push-Notification works on develpoment but not on production

So we have a problem with our app. 因此,我们的应用程序出现了问题。 We put push-notification in, and it works flawlessly in development. 我们放入了推送通知,它在开发中完美无缺。 Then, once we got on the app store push no longer works. 然后,一旦我们进入应用商店,推送就不再起作用。 By looking at our server logs it looks like the the registration call is failing and not getting a device token. 通过查看我们的服务器日志,看来注册调用失败并且没有获得设备令牌。

Has anyone encountered this before? 有人遇到过吗?

Cheers, 干杯,

Did you create a production push notification SSL certificate? 您是否创建了生产推送通知SSL证书? This is most frequently the cause. 这是最常见的原因。 Applications signed with a development provisioning profile will not work with a production push SSL cert and applications signed with a distribution provisioning profile will not work with a development push cert. 使用开发配置文件签名的应用程序不能与生产推送SSL证书一起使用,使用分发配置文件签名的应用程序不能与开发推送证书一起使用。

Also, you can create an ad-hoc distribution cert and use this to test your distribution provisioning profile. 另外,您可以创建一个临时分发证书,并使用它来测试您的分发设置配置文件。 Since you can't run the build you send to Apple for distribution, I'd strongly encourage you to make an ad-hoc distribution build and confirm that push notifications work in that installation. 由于您无法运行发送给Apple进行分发的内部版本,因​​此强烈建议您制作临时的内部版本,并确认推送通知在该安装中有效。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM