App Store Distribution fails on valid com.apple.developer.healthkit.access value

The error trying to distrubute to the store
Code Block
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/<app>.app/<app>'

Looking at the docs, this is a valid value:
https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_healthkit_access

Similarly, I had no issue until this appeared randomly....

Entitlement File
Code Block
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.healthkit.access</key>
<array/>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.associated-domains</key>
<array>
<string>webcredentials:invoy.com</string>
<string>webcredentials:invoy.dev</string>
<string>webcredentials:invoydev.com</string>
<string>webcredentials:invoystage.com</string>
<string>applinks:invoy.com</string>
<string>applinks:www.invoy.com</string>
<string>applinks:invoy.dev</string>
<string>applinks:www.invoy.dev</string>
<string>applinks:invoydev.com</string>
<string>applinks:www.invoydev.com</string>
<string>applinks:invoystage.com</string>
<string>applinks:www.invoystage.com</string>
</array>
<key>com.apple.developer.healthkit</key>
<true/>
</dict>
</plist>


HealthKit is enabled as a capability in Apple Profile as well as for the product.

Does anyone have an idea of what could be going wrong? Seems like I am correctly following the practices.
Answered by bricepollock1 in 656525022
I removed com.apple.developer.healthkit.access and fixed it.
I have the same issue.

You can't just remove the key com.apple.developer.healthkit.access because then the general entitlement for HealthKit will also disappear from Signing & Capabilities.

I have also submitted multiple tickets to Apple since I've hit this brick wall.

Perhaps enabling "clinical health records" may bypass the error, but Apple says if you include this entitlement but don't use clinical data, then you will be rejected.

Also, Xcode creates and populates this file, so manually editing this file should not be necessary.

Apple developers, please fix this ASAP
Code Block language
<key>com.apple.developer.healthkit.access</key>
<array/>


Since the message complains about passing an empty array I removed only the <array/> and all worked fine.
HealthKit still listed in XCode capabilities and archive successfully uploaded to TestFlight.
Same issue for me regarding HealthKit — I don't want health record access, but I cannot remove the key from my entitlements file without removing the HealthKit entitlement entirely. Uploads to TestFlight worked fine with an empty array for com.apple.developer.healthkit.access on 12 January, 2021, but started failing for me yesterday.

I've filed FB8972571.
NONE of these hacks of the .entitlements file are "fixes." @Apple fix this yesterday.
I have the same issue with my code and since it's complaining about an empty array I have added <array> to the beginning of the list.

Code Block Language swift
<dict>
    <array>
<key>com.apple.developer.healthkit</key>
<true/>
    <key>com.apple.developer.healthkit.access</key>
    <array/>
</dict>

I have submitted it to TestFlight

Having the same issue, it's not fixed yet, unfortunately
The fourth day can't upload the app. Still waiting for a fix on the Apple side.
Removing line with access removes Apple Health Kit capability from the capabilities list, so I'm unsure about this solution...

Within build from Testflight — Apple Health is working. Brrr...
I am still waiting.
I'm surprised Apple hasn't addressed this yet. Does anyone have an open ticket with them?
Also have the same issue. Hopefully a fix is imminent.
Having the same issue here... please help Apple!
I am still waiting any update from apple
Waiting + 1
I'm also waiting ... Does Apple know they're blocking EVERY HealthKit App from submitting updates?
Same issue here. We're blocked by not being able to submit an App update for a customer. Removing entries seems not to be the proper way to address this issue in my humble opinion. Any updates on this, anyone? Thanks!
I add
Code Block
<array>

was fixed for me
sorry, add <array> isn't a solution. When I add this the app don't read and write data to HealthKit
I just said a quick prayer to Tim Apple so hopefully this gets resolved soon
It has been five days since this issue appeared and we can't push an update.

There are edits in the Entitlement filed that seem to allow the app to go through on APC but it's unclear how these changes might affect the app's behaviour when it's released.

Has anyone released an update after making any of those edits? Have you come across any issues?
bricepollock1 - Please un-accept your answer to the ticket so that Apple engineers will actually attempt to fix this. That is not a solution as it will prevent the app from getting through the App Store Review process
Has this been resolved for anyone?
This is a frustrating amount of time to wait. Please help Apple!
We have the same problem with uploading our app to App Store Connect. Here are the main points.
  • We see this 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/XXXX.app/XXXX'."

  • The com.apple.developer.healthkit.access array includes health-records in our provisioning profile, but not the com.apple.developer.healthkit.access array in the app bundle's entitlements file

  • Removing the existing provisioning profile and creating a new provisioning profile doesn't fix the problem

  • Adding health-records to the array in the entitlements fixes the problem and we may upload the app successfully, but this doesn't solve the problem, since we don't need the access to the Clinical Health Records API the health-records entry allows

I invite everyone to submit a bug report for this issue: https://feedbackassistant.apple.com/

@bricepollock1 please mark this thread as not resolved.
Same probleme here. Unable to update my App.
App Store Distribution fails on valid com.apple.developer.healthkit.access value
 
 
Q