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.