-
-
Notifications
You must be signed in to change notification settings - Fork 197
Build in release mode for iOS doesn't seem to set the production mode for APN #2888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Actually I've just experienced this with a non-angular app as well. I have no idea how XCode sets the "prodcution" mode for the push notifications but seems the CLI is missing something. I've set the |
@georgiwe @PeterStaev We had similar issue and we fixed it in CLI 3.1.1 Can you please test with |
@dtopuzov I've just tested and the problem still persists with CLI 3.1.1. I do not think the issue you linked is related, as the entitlements are not in the Also note that after the project is prepared by the CLI, if I open the Xcode solution and just change the default Run scheme to use Release instead of Debug and deploy to device from there w/o doing any other changes, the device correctly registers with the production APN environment. That's why I suspect some option is not sent correctly to whatever the CLI uses to build and archive the app. |
Could be related to #2999 |
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:
"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.
The text was updated successfully, but these errors were encountered: