HealthKit error: Missing com.apple.developer.healthkit entitlement HealthKit error: Missing com.apple.developer.healthkit entitlement swift swift

HealthKit error: Missing com.apple.developer.healthkit entitlement


I spent 3 days trying to figure out what was the problem. I found the solution with those steps:

enter image description here

  1. First go to the project (As I show in the image)
  2. Open projects and target lists
  3. Select nameApp WatchKit Extension
  4. Go to Capabilities tab, press on in Health Kit and voila... it is working for me.

I am using iOS 9.3.2 and Xcode 7.3.1


Both of the above answers should be tried first. If however

  1. You're sure the capability has been activated
  2. You're confident your app id associated with your provisioning profile has healthkit turned on and matches the app's bundle id

Then try and force the build to use that specific provisioning profile by selecting your target and going to

build settings -> code signing -> provisioning profile

and selecting it manually.

I've run into cases where get the above error in debug if 'automatic selection' is being used


That error is due to the fact that you have not added the HealthKit Entitlement to your target.

  1. Go to your project settings in Xcode.
  2. From there, navigate to the "Capabilities" Tab.
  3. Scroll down until you see "HealthKit" and flip the switch to on.
  4. Xcode will now add the HealthKit Entitlement to you Info.plist, your {ProjectName}.entitlements file, and your App ID on iTunes Connect

After following these steps, try to run your app again. This time around it should work.