15
votes

I'm using Ionic/Cordova to build an Android and iOS app. Before deployments, I use Jenkins to run 'ionic build ios --device' to create a final IPA file for QA to test against. Unfortunately, using xCode 8 you now have to manually enable the Push Notification capability in the XCode project capabilities settings.

Is there a way to pass capabilities to ionic build or cordova build so that push notifications will be enabled when building via CLI?

1
Yes I need to know how to fix this aswell. I was thinking about buildflags but cannot find any information.magnusarinell
@MarkRoach As mentioned in xcode8 release notes, "Xcode 8 does not automatically copy the aps-environment entitlement from provisioning profiles at build time. This behavior is intentional. To use this entitlement, either enable Push Notifications in the project editor’s Capabilities pane, or manually add the entitlement to your entitlements file. (28076333)" So you may have to automate the manual addition of entitltements i guess as i m not an expert in iOSGandhi

1 Answers

5
votes

If you update Cordova CLI to 6.4.0, update your platform to cordova-ios 4.3.1 and update the phonegap-plugin-push to 1.9.2 then everything should work.

If you are using another plugin, it will need an update.

You can also download Xcode 7 from the Apple developer website and continue using it until Apple makes Xcode 8 mandatory.