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

為{幸葍}努か 提交于 2021-02-02 17:57:16

问题


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.


回答1:


Apple has fixed the issue. You can now try submitting app to TestFlight without making any changes.

Thread on Apple Developer forum: https://developer.apple.com/forums/thread/671352




回答2:


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.




回答3:


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



回答4:


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



回答5:


For me solution is to remove the following line in the .entitlements file

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

!This work if you submit the app for TestFlight!

This does not work if you submit the app for review :(. Binary will be rejected ITMS-90000: This bundle is invalid - $message.

What work for me: First, when you enable your app’s HealthKit capabilities: you must also select the Clinical Health Records checkbox! enter image description here

Next, you must provide a Health Records Usage string in your app’s Info.plist file. enter image description here




回答6:


Same error for me with "icloud-container", just comment these lines in your . entitlements file:

<key>com.apple.developer.[YOUR-ERROR]</key>
<array/>



回答7:


Deleting the empty iCloud Container entitlement (array) from the entitlement files solved the issue for me. Seems like a server-side change from Apple that no longer allows an empty array there.




回答8:


I commented-out/removed

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

in .entitlements and it works!




回答9:


What worked for me

Before started trying, I checked my .entitlements file it looks like this:

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

Step 1: Remove and add HealthKit capability again.

  • Remove HealthKit from "Signing and Capabilities"

  • Add HealthKit back

2

Step 2: Check on "Clinical Health Records"

3

Once done, you shall be able to see your .entitlements file become

    <key>com.apple.developer.healthkit</key>
    <true/>
    <key>com.apple.developer.healthkit.access</key>
    <array>
        <string>health-records</string>
    </array>

Step 3: Add Privacy - Health Records Usage Description and its value to info.plist

Final: Then I tried to archive and upload to TestFlight, it worked.




回答10:


A key with a value that is an empty array seems to be not allowed in entitlements anymore. Just removing the key/value pair fixed it for me.




回答11:


I had the same issue with Network extensions, it is also empty and deleting it from Entitlements solved the issue.




回答12:


Deleting the empty iCloud container entitlement will resolve the upload issue. But the app cannot select any documents from iCloud using document picker (UIDocumentMenuViewController).

We would end up with a crash in the app as below:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application initializing document picker is missing the iCloud entitlement. Is com.apple.developer.icloud-container-identifiers set?'



来源:https://stackoverflow.com/questions/65712249/the-entitlements-in-your-app-bundle-signature-do-not-match-the-ones-that-are-con

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!