Hello
We are implementing a step counter in our app (iOS/Android), for this feature to work we must prompt the user to allow ‘Motion & Fitness’ permission. But I can’t seem to make this work on demand.
I tried simply activating the feature to make iOS react and show a decision dialogue, but it simply doesn’t do anything. I also noted that the permission only has 2 states in the phone’s app settings, allowed/disallowed, no ask every time option.
InputSystem.EnableDevice(UnityEngine.InputSystem.iOS.LowLevel.iOSStepCounter.current);
UnityEngine.InputSystem.iOS.LowLevel.iOSStepCounter.current.MakeCurrent();
I approached it this way as that also seems to be the best way to ask for location permissions, simply start the location service and iOS shows the appropriate dialogue, but not here.
Unity’s Application.RequestUserAuthorization only seems to deal with Camera and Microphone, has anyone else figured out an on-demand solution? Also I have already added a motion usage description for iOS in settings, the feature works when a user turns on Motion & Fitness in their settings.