I don’t know what is going on, my unity app running on iphone 7(ios 14.6) is not working in reading the pedometer, I think the cause should be not asking for NSMotionUsageDescription permission request.
I am using BEHealthKit, and just calling the healthStore.BeginReadingPedometerData
. and the NSMotionUsageDescription in info.plist:
<key>NSMotionUsageDescription</key>
<string>We require access to your motion sensor</string>
Noticed that everything work fine with newer iphone (xr+)(ios 14.6)
Is the motion usage not available in iphone 7 ? Any possibility would block the NSMotionUsageDescription permission request ?
**Log **
---------- START ----------
HealthKitFullTest:Start()
--- authorizing ---
BeliefEngine.HealthKit.HealthStore:Authorize(HealthKitDataTypes, AuthorizationHandler)
2021-08-02 13:20:32.984874+0800 myApp[1390:260448] adding HKQuantityTypeIdentifierStepCount
Setting up 1 worker threads for Enlighten.
Thread -> id: 16ca43000 -> priority: 1
2021-08-02 13:20:45.302456+0800 myApp[1390:260695] [Pedometer] Error occurred: The operation couldn’t be completed. (CMErrorDomain error 105.)
2021-08-02 13:20:45.304582+0800 myApp[1390:260696] update: ((null) -> (null)) : (null)
2021-08-02 13:21:12.921684+0800 myApp[1390:260695] [Pedometer] Error occurred: The operation couldn’t be completed. (CMErrorDomain error 105.)
2021-08-02 13:21:12.923527+0800 myApp[1390:260696] update: ((null) -> (null)) : (null)