简体   繁体   中英

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

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.

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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