Push notifications don't work in Apple Beta Testing (TestFlight)

空扰寡人 提交于 2019-12-22 10:59:06

问题


Push notifications worked fine with a Development provisioning profile, but once I tried putting the app on the Beta testing programme (TestFlight), they don't.

I tried following all the required steps when switching to a Production profile, but it still doesn't work. Here's what I have.

In the Member Center:

  • Certificate of type iOS Distribution.
  • App ID. Named (not wildcard). Push notifications enabled for both Development and Distribution - green lights - with all SSL certificates generated and uploaded.
  • iOS Distribution Provisioning Profile, that uses the above mentioned Certificate and App ID as well as lists Push Notifications among enabled services.

In XCode. Target > Build Settings > Code Signing:

  • Provisioning profile - iOS Distribution, same as in Member Center.
  • Code signing identity (both Debug and Release) - iPhone Distribution.

Am I missing something (not so) obvious? Any help would be greatly appreciated.


回答1:


Everything seems correct. Maybe you should precise what is not working :

  • App not registering to APNS token at all
  • App correctly registering but push not received

Process to the following checks

App not registering to APNS token at all

Mobile Provision

Make sure you refresh your mobileprovisions through XCode after enabling push to be sure those includes the correct entitlements. You can check this by opening the mobile provision in an editor and look for the aps-environment key?

Registration to APNS

make sure the code to register to APNS does not depend on any personal settings (like a Push Id for some SaaS push service that is missing)

.

App correctly registering but push not received

  • Check that the pushToken received is sent to the correct environment of your server (the one that connect to APNS)
  • Check that your server is using the Production APNS Certificate



回答2:


As it happens, I failed to provide full context in my question. I use Parse.com to handle my backend as well as push notifications. So what I was missing was a production certificate on Parse.com, not just a development one. So, if anyone else is using Parse and ran into a similar problem, I hope this is helpful.



来源:https://stackoverflow.com/questions/32415618/push-notifications-dont-work-in-apple-beta-testing-testflight

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!