iOS Entitlements not set after update to RC5 [Bug]

Hey guys,

small explanation.
Before I want to upload something to Apples App Store I do this steps.

  1. Git clone repository
  2. npm install
  3. ionic resources ios
  4. ionic platform add ios
  5. ionic build ios --prod

So that nothing can go wrong and everything works fine.
Sometimes a npm -g outdated and then updating the outdated packages.

The last time I did this successfully was on 9th January.

After opening the project in XCode everything looks great.
At capabilities tab I saw Push Notifications checked, Maps checked, Background modes (remote Notifications) checked and Associated Domains checked.

Then now I did the same and only the maps and Background modes tab is checked.
Not the Push Notifications and not the associated Domains.

I found out that the plugins which Iā€™m using (onesignal-cordova-plugin & ionic-plugin-deeplinks) write to the Entitlements file.
I can find them in platforms/ios/MyApp/Entitlements-Release.plist and Entitlements-Debug.plist.

But its not enabled anymore.
I uploaded the file to iTunes Connect and I got a mail that Missing Push Notification Entitlement ā€¦ the app signatureā€™s entitlements do not include the ā€œaps-environmentā€ entitlement.

I found out that I can solve this by using the ā€“entitlements flag (https://developer.apple.com/library/content/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html).

Can someone explain me why this changed and why this is not checked automatically?

Its important to know why this things changed without any information so that we can handle things like this in advance :slight_smile:

Thank you really really much in Advance! For any ideas!

1 Like

Ah ok if I use xcodebuild manually I must add the option CODE_SIGN_ENTITLEMENTS = ā€œ$(PROJECT_DIR)/$(PROJECT_NAME)/Entitlements-$(CONFIGURATION).plistā€.

Then it works :sweat_smile:

Patrick,

Can you be a bit more specific in your solution?

Iā€™m running into the exact same problem when I combine deeplink with onesignal.

I see three entitlements files in my Resources directoryā€“one simply ā€œappName-entitlementsā€, one ā€œEntitlements.debug.plistā€ and ā€œEntitlements.release.plistā€.

The xcode gui under Build Settings indicates my project is pointing to ā€œAppname.entitlementsā€

Iā€™ve seen other people say that no matter what they do they canā€™t get the entitlement to stay as ā€˜productionā€™ when they upload a build. Can you be a bit more explicit?

Thanks!

@patrick.bussmann Can you please brief this out, I am trying to run a script which generate a ipa which includes all the required capabilities enabled like iCloud for example, able to generate ipa but not able to attach capabilities to the application. your inputs will save my day :slight_smile:

Hi, which cmd you used with ā€“entitlements flag ?
Thanks