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
App Store Distribution fails on valid com.apple.developer.healthkit.access value
 
 
Q