I would like to test a HealthKit app in the iOS Simulator without an iPhone Developer Account. I added an entitlement file with the com.apple.developer.healthkit capability enabled and when I build the app it seems to include the file in the bundle but then when I try to access the HealthKit API the Simulator throws this error:
Error Domain=com.apple.healthkit
Code=4 "Missing com.apple.developer.healthkit entitlement."
UserInfo=0x7fc939f091c0
{NSLocalizedDescription=Missing com.apple.developer.healthkit entitlement.}
Is there any option to try HealthKit in the iOS Simulator without a Developer Account?
The easiest way is to download the example app from:
https://developer.apple.com/library/ios/samplecode/Fit/Introduction/Intro.html
and play with it.
You need to add the entitlement to the project.
Goto
Project Settings >> Capabilities
Scroll Down the list to
HealthKit
and Turn itON
If you're testing on a real Device then you also need to add that entitlement from your apple developer account for that specific appID and update Provisioning profile and download it again.