Hi ,
I'm using Xcode 14 to develop a watch app for Apple Watch Ultra. One of the things I want it to do is read the water temperature and maybe wearers temperature. I think I need the NSMotionUsageDescription entitlement in order to access the water temperature. I deduced this from the crash that occurs when the app tries to use the CMWaterSubmersionManager. So i've added the NSMotionUsageDescription entitlement to the Entitlements file but when the automatic signing process fails with the error
Automatic signing failed. Xcode failed to provision this target. Please file a bug report at https://feedbackassistant.apple.com and include the Update Signing report from the Report navigator.
and
Provisioning profile "iOS Team Provisioning Profile: *" doesn't include the NSMotionUsageDescription entitlement.
I think the first error is causing the second but I'm not sure. I'm experienced software engineer but this is my first mobile app so I'm very much a newbie to Apple development. Any help with resolving the error much appreciated.
I've got to the bottom of my problem. I'd added the Health Capability and my mistake was to add the NSMotionUsageDescription to the entitlements files that adding the capability created. I should have added it to the pList section in build settings. Once i did this I received the authorisation request on the watch which allowed me to authorise motion data usage. Now when the CMWaterSubmersionManager is queried for the authorisation status it reports authorised.