IOS – What type of provisioning profile is required for TestFlight external testing

apnsiosnotificationstestflightxcode

I've been trying to get Ionic push notifications to work on my TestFlight app for beta-testing for weeks now and I still have not managed to implement them successfully. When I build for release via Xcode, everything works fine. I have double-checked to ensure that the necessary certificates are set up fine yet for some reason however, push notifications fail to be received (though device token registration works fine) on TestFlight.

I have read many conflicting answers on forums, documentations and tutorials stating that an Ad-hoc provisioning profile is needed for TestFlight while others state that a distribution profile must be used. First of all, somehow the Ad-hoc profile does not attach with the build when I Archive and try to upload onto TestFlight via Xcode. Second of all, I have managed to upload on TestFlight using the Distribution profile but the push notifications are not received. I am now stumped on how I have to get push notifications to work on TestFlight.

My question is: which provisioning profile has to be used for a TestFlight app and what could be the reason why it is not working? Thank you.

Best Answer

Since Testflight has been integrated in the App Store / iTunes Connect, you'll need to upload it to iTunes Connect, which means you need an App Store provisioning profile, not an Ad-Hoc one. I can imagine that older tutorials, made when Testflight was a stand-alone platform, still describe the situation were an Ad-Hoc provisioning profile was necessary.

As for the push notifications:

  • are you sure you use the Production environment of APN (the Sandbox environment only works for debug builds)?
  • do you get any error messages (on the server) when sending the push notifications?
  • if you call the Feedback service of APN, do the devices appear there?