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

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.


Solution

What worked for me was to remove the following line in the .entitlements file

<key>com.apple.developer.healthkit.access</key>
<array/>

Validation

  • I double checked and the HealthKit access still works for read/write when building via Xcode
  • I tested the app via TestFlight and everything still looks good
  • My app got approved and everything works fine for existing and new users :)

Side notes

  • I had the same issue. I haven’t changed the entitlements for months and out of a sudden that error appeared. It might be the case that Apple changed some logic and applied stricter rules on their backend entitlement validation.

  • Interesting that if you create a new Xcode project and add the HealthKit entitlements it creates the entitlements like:

<key>com.apple.developer.healthkit</key>
<true/>
<key>com.apple.developer.healthkit.access</key>
<array/>
  • Interesting read: https://developer.apple.com/forums/thread/10738

Remove 'com.apple.developer.healthkit.access' won't help the issue. So far we can just hope to wait for Apple to fix this.

Thread on forum (i can't access the Marceeelll's thread): https://developer.apple.com/forums/thread/671352

Related:

  • App Store Connect Operation Error: ITMS-90164 [] for key com.apple.developer.healthkit.access

Tags:

Ios

Xcode

Flutter