且构网

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

解析推送通知 iOS

更新时间:2023-02-16 21:40:37

我不久前遇到了这个问题.对我来说,这是开发人员版本和发布版本之间的区别.您将在 Apple 的配置门户中看到,您可以为您的应用程序设置 2 个推送证书.一个用于生产发布,另一个用于开发人员测试.当您构建应用程序进行测试时,它会自动查找开发人员证书.当您进行发布构建时,它会查找发布证书.

I ran into this a while back. For me it was the difference between developer builds and release builds. You'll see in Apple's provisioning portal that there are 2 push certificates you can set up for your app. One is for production release and the other is for developer testing. When you build your app for testing it automatically looks for the developer cert. When you do a release build it looks for the release cert.

所以...确保您已将正确的推送证书上传到 Parse.就我而言,Parse 会说消息已发送到设备,但我从未看到它们通过,因为 Parse 将它们发送给 Apple 的证书与我的特定构建类型不匹配.

So... Make sure you have uploaded the correct push certificate to Parse. In my case Parse would say that messages had been sent to devices but I never saw them come through because Parse was sending them to Apple with a certificate that did not match my particular build type.