Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile

Tags:

xcode

ios

flutter

I have submitted many app builds to TestFlight, even yesterday, but today when I tried to submit my app to TestFlight via XCODE I get the following error:

ERROR ITMS-90164: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. According to the provisioning profile, the bundle contains a key value that is not allowed: '[ ]' for the key 'com.apple.developer.healthkit.access' in 'Payload/Runner.app/Runner'."

I'm building a flutter project via XCODE. I have tried the following:

  • Cleaning my project.
  • Re-enabling automatic app signing in XCODE.
  • Deleting my provisioning files from ~/Library/MobileDevice/Provisioning\ Profiles/
  • Disabling automatic signing in xcode and creating my own provisioning profile via the Apple Developer site

But I'm still getting this error. My enablements haven't changed from the last time I uploaded my app. Please help, thank you.

UPDATE 1: Appears to be a change made on Apples end that is causing this error. No official response/explanation from Apple has been provided yet. Some workarounds have been provided below. I went with enabling Clinical Health Records usage for the Health Kit enablement since this workaround doesn't use any non-apple approved changes. So still technically not a final solution, but a workaround.

UPDATE 2: Apple has resolved the issue on their end, no workarounds are required anymore.

like image 366
John Avatar asked Jan 14 '21 01:01

John


People also ask

How do I add entitlements to my provisioning profile?

To use this special entitlement you must create a new provisioning profile in the Certificates, Identifiers & Profiles section of your developer account and select the entitlement after the “Do you need additional entitlements?” page.

What is entitlement file in Xcode?

An app stores its entitlements as key-value pairs embedded in the code signature of its binary executable. You configure entitlements for your app by declaring capabilities for a target in Xcode. Xcode records capabilities that you add in a property list file with the . entitlements extension.

What is code signing entitlement Xcode?

During code signing, the entitlements corresponding to the app's enabled Capabilities/Services are transferred to the app's signature from the provisioning profile Xcode chose to sign the app. The provisioning profile is embedded into the app bundle during the build.

How do I create a provisioning profile in keychain?

Upload keychain and provisioning profile files sectionClick on "Choose File" and select the keychain or provisioning profile file. 2. Click on "Upload". The keychain or provisioning profile file is automatically uploaded and stored on the jenkins.


1 Answers

I was facing the similar error.

I believe the Apple back-end has changed and has started applying a stricter rule to entitlement keys that take array values.

I believe the Apple back-end used to accept empty arrays for entitlement keys that took array values but now require the entitlement key to either not be present at all or to contain actual values.

Evidence to back this assertion:

  • I have an entitlements file with a key for "com.apple.developer.icloud-container-identifiers" entitlement with an empty array like so:
  <key>com.apple.developer.icloud-container-identifiers</key>   <array/> 
  • This was fine until just yesterday (I successfully submitted a build, and have submitted builds like this for more than a year).

The Fix:

Remove or Comment out the following line from the .entitlements file:

  <key>com.apple.developer.icloud-container-identifiers</key>   <array/> 
  • The key was empty anyway so should not have an effect after being removed.

Now the TestFlight submission is successful.

like image 72
NYSamnang Avatar answered Oct 12 '22 22:10

NYSamnang