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:
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.
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.
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.
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.
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.
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:
<key>com.apple.developer.icloud-container-identifiers</key> <array/>
The Fix:
Remove or Comment out the following line from the .entitlements
file:
<key>com.apple.developer.icloud-container-identifiers</key> <array/>
Now the TestFlight submission is successful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With