iOS 17.5.1 Update NSMotionUsageDescription issue

When the user updates the system to 17.5.1 and our application crashes, and then debugs with xcode, it is found that NSMotionUsageDescription permission is required. This confuses us because we do not have access to this API

  1. Searching for APIs

Execute grep - r CMMotionActivityManager under the application folder There are no records

  1. Non iOS 17.5.1

No relevant reports available

How can we delve deeper into which API is causing it

In the later iOS versions, additional CoreMotion APIs have been added to the requirement that the NSMotionUsageDescription privacy string must be present in your app. For example CMAltimeter is one of the new APIs that now requires this.

If your app is using any CoreMotion APIs at all, and you are running into this issue, then you must add this privacy string. If you are importing @CoreMotion at all in your app, it is better to add this string unless you have a reason to not to.

If your app is not explicitly using any CoreMotion APIs, then one of the 3rd party libraries, pods, etc., you might be linking could be using these APIs without clarifying their use. In either case your app is responsible for all the code within it, so you would either need to find the section of code in your app, or find out which 3rd party is using a Core Motion API without you knowing, or add the privacy string.

iOS 17.5.1 Update NSMotionUsageDescription issue
 
 
Q