Open Juliocbr opened 6 years ago
@Juliocbr if you are using test flight you need to send to production APNS not development APNS.
@macdonst Do you think there could be a way to get the APNS-env value? 🤔 So the server could handle both dev & prod notifications depending on how the device got the app (from store/testflight or build locally)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Actual Behaviour
Plugin generates device token correctly when I run the app with "ionic cordova run ios" command, but when I upload app to testflight and download the app, the generated device token is invalid for APNS, the message that I received from APNS is "BadDeviceToken".
I have configured the development and production certificates for push notifications in apple developer webpage for the app.
Cordova CLI version and cordova platform version
ionic (Ionic CLI) : 3.20.0 cordova (Cordova CLI) : 7.1.0 Xcode 9.3 cordova ios: 4.5.4
Plugin version
phonegap-plugin-push 2.2.2
For example this token is invalid:
bd4b61ffa8c7d77be841dc50169eca94cc633812833917a520456df9e1a5d779
This is my code: