This usually happens when the app is missing the following lines in the Info.plist file:
Privacy - Health Update Usage Description
Privacy - Health Share Usage Description
Open your Info.plist file on the Project navigator and make sure these are present on the iOS side (i.e. no need for these on the watchOS Info.plist files if you have them). Give them values that explain why your app needs access to that information, e.g. "MyApp needs this information to track your heart rate".
Also, make sure you have the HealthKit capability enabled for your project. To check if you have it on Xcode 10:
- Open the Project navigator in Xcode and select your project (usually the top level item)
- Select Capabilities
- Check if HealthKit is set to
ON