I am trying to add HealthKit to my watchOS app (with companion app).
By default when you add a watchOS the bundle identifier is .watchkitapp
Once I add HealthKit to the Signing & Capabilities
tab on my watch app target, when i try to deploy to my device (not simulator) the build fails with the errors:
Failed to register bundle identifier: The app identifier ".watchkitapp" cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again.
Provisioning profile "iOS Team Provisioning Profile: *" doesn't include the com.apple.developer.healthkit and com.apple.developer.healthkit.access entitlements.
Provisioning profile "iOS Team Provisioning Profile: *" doesn't support the HealthKit capability.
I've tried changing the bundle identifier to my ios app's bundle identifier followed by .watchkitapp com.companyname.appname.watchkitapp
, but when i build the build initially works but then gives an pop up with an install error
This app contains a WatchKit app with an invalid bundle identifier. The bundle identifier of a WatchKit app must have a prefix consisting of the companion app's bundle identifier, followed by a '.'.
I've tried cleaning my build folder, restarting xcode and my devices but nothing helps