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.
Accepted Answer
I removed com.apple.developer.healthkit.access and fixed it.
Same problem here
I also removed healthkit.access fragment from entitlements and it uploaded fine. This must've been some very recent silent change in AppStore Connect validation policies
I had the same issue today starting at 3PM eastern time (jan 13) I opened a ticket at Apple, but they send me back to Xcode documentation and WWDC videos on automatic signing. I had also uploaded 1 or 2 builds earlier this morning on TestFlight without any issues.
I deleted the entry (the empty array com.apple.developer.healthkit.access), but after upload, I received the message : ITMS-90000: This bundle is invalid - $message. very weird
also, this empty array is generated by Xcode as soon as you add/remove health kit.
Same here.
I got the same error :( It was fine yesterday...

After removing com.apple.developer.healthkit.access,
the upload is success, but the build does not appear on TestFlight. (Uploaded 2 build and it won't show)
Mega frustrating. For me, like simonguertin, if you remove the entry, you can upload, but the bundle is still invalid and cannot be used as a build. Everything worked just like before, so it must be an Apple issue. Will send them a ticket.
Same issue, app uploaded fine to TestFlight just yesterday, but I'm getting that error today. I tried all of the below:
  • 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

None of that worked so don't waste your time.
This issue is suddenly happening to us. By removing com.apple.developer.healthkit.access cause invalid bundle when the archive is uploaded, it will cause your app not listed on a test flight. So this is not a proper solution. How we can solve this? Should we just wait?
Same problem here
Worked yesterday, not working today with same build. Removing the fragment blocks me from getting Apple Health permissions... Hopefully this is fixed soon.
Same here, removed com.apple.developer.healthkit.access and fixed it.
Same Problem Here. How this can be possible
Same Problem Here. Wasting my hours when apple change something and does not let developers know about it. Great developer experience. Thanks.
same here!
Just an update - suggestions did work for me. Just make sure to delete com.apple.developer.healthkit.access key and value. Was able to access Apple Health and release build on testflight
I have the same problem but with com.apple.developer.icloud-container-identifiers key. Moreover, the build I uploaded never reached App Store Connect after ~40 minutes
Same problem. I did get a build to upload if I hand deleted "com.apple.developer.healthkit.access", but I'm concerned about releasing that build if cause that had unintended consequences. Hopefully Apples fixes this issue soon.
I was facing the same error, I fixed searching for the key Keychain Access groups and removing it from the entitlements, it was an empty array.

https://stackoverflow.com/questions/65719776/xcode-according-to-the-provisioning-profile-the-bundle-contains-a-key-value-th/65719802#65719802
I got the same Problem, I don't wanna remove anything from my project, I need a official explanation, anybody know?
Adding health-records value into array of com.apple.developer.healthkit.access key or removing this key from entitlements at all fixes this uploading issue but build doesn't appear in App Store Connect and later we get an email with error:
ITMS-90000: This bundle is invalid - $message.
This issue is described here https://developer.apple.com/forums/thread/671373
I fixed this by adding the health-records entry like so:

Code Block
<dict>
<key>com.apple.developer.healthkit.access</key>
<array>
<string>health-records</string>
</array>
</dict>


Does anyone know if I set com.apple.developer.healthkit.access to health-records (which I believe is the same as checking the box for "Clinical Access Records") just to fix this App Store Connect bug, and submit the version to Apple and they approve it, can I just remove that capability afterwards?

Or is it like "Made for Kids" where once your app has ever had access to "Clinical Health Records" you can't remove that permission?

The other problem is it sounds like you'd need some sort of medical study to have access to clinical records, so it's not so simple as checking a checkbox, right?

We're encountering the same ITMS-90000: This bundle is invalid - $message. when uploading to App Store Connect so removing the "healthkit.access" key isn't a solution for us.

Thanks,
Andrew
App Store Distribution fails on valid com.apple.developer.healthkit.access value
 
 
Q