Description
Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo?
Yes.
Tell us about the problem
I'm trying to submit an app to the Apple store, but am unable to receive a push notification when building with ad-hoc provisioning profile and a production push notifications certificate. The app uses angular and AOT compilation. It's, of course, possible that I'm missing something.
The app builds, deploys and runs properly, with the exception that when I send a push notification (using the production setup and certificate), the device is marked as disabled and the notification is never received. If I use the development setup (sandbox and certificate), the app receives the notification. So I'm guessing the entitlement's "mode" is not set to production, even though I attempted to set it manually, but to no effect. I guess xcode is supposed to handle this?
Which platform(s) does your issue occur on?
iOS
Please provide the following version numbers that your issue occurs with:
- CLI: 3.0.1
- Cross-platform modules: 2.5.1
- Runtime(s): 2.5.0 for both runtimes
- Plugin(s):
"nativescript-angular": "1.4.1",
"nativescript-imagepicker": "2.5.2",
"nativescript-permissions": "1.2.3",
"nativescript-push-notifications": "0.1.2",
"nativescript-telerik-ui": "1.6.1",
"nativescript-theme-core": "0.1.5",
Please tell us how to recreate the issue in as much detail as possible.
I'm building the app with the following command:
tns build ios --bundle --disable-npm-install --release --for-device
Then I take the .ipa file and put it on iTunes, and from there sync it to a device. Then send a push notification to that device and it is not received. The device is then marked as "disabled" in APN.
If I build the app this way, then build/run it in release mode through xcode, the app works as expected. This is the approach I will use to submit the app to the store, for the time being.
Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.
There's an entire app, but it can be as small as you like, as long as it features push notifications.