NSMotionUsageDescription entitlement problem

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.

Answered by ZolaDaz in 740854022

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.

You've definitely got some provisioning problems here, but they might all stem from the fact that CMWaterSubmersionManager cannot be used without an entitlement, and that entitlement isn't available to developers yet. Information on how to request the entitlement to read temperature and pressure should be available soon. Once you've got that entitlement, the usage description string goes in the Info.plist file. :-)

Thanks for the reply, your probably correct about the CMWaterSubmersionManager but the NSMotionUsageDescription entitlement is used for other features under Core Motion so I should still be able to add that entitlement shouldn't I?

Accepted Answer

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.

NSMotionUsageDescription entitlement problem
 
 
Q