This usually happens when the application does not have the following lines in the Info.plist file:
Privacy - Health Update Usage DescriptionPrivacy - Health Share Usage Description
Open the Info.plist file in the project navigator and make sure that they are present on the iOS side (i.e., they are not needed in watchOS Info.plist files, if you have any). Give them values ββthat explain why your application needs access to this information, for example, "MyApp needs this information to track your heart rate."
Also make sure you have the HealthKit feature enabled for your project. To check if you have this on Xcode 10:
- Open the project navigator in Xcode and select your project (usually a top-level item)
- Choose features
- Check if HealthKit is set to
ON
source share