Search code examples
swifthealthkit

How do I add this entitlement in Xcode/Swift com.apple.developer.healthkit.background-delivery?


Currently I have both the HealthKit and access to HealthKit records.

How do I add com.apple.developer.healthkit.background-delivery to entitlements in swift/Xcode?image of current entitlement

capability for HealthKit is also turned on healthkit capability

Provisioning profile "iOS Team Provisioning Profile: blah for blah contains entitlements that aren't in the entitlements file: com.apple.developer.healthkit.background-delivery. To use these entitlements, add them to your entitlements file. Otherwise, remove unused entitlements from your provisioning profile.


Solution

  • Had the same warning. Add a new key com.apple.developer.healthkit.background-delivery to your entitlements file, use boolean type and set this to 1.

    Apple Source: com.apple.developer.healthkit.background-delivery

    Solved the issue for me. Screenshot