My App requires Motion & Fitness permission to run.
When prompted to toggle the permission the app crashes in the simulator(or device) with nothing more than the error:
Message from debugger: Terminated due to signal 9
Running xCode: v14.3.1, iOS 16.4, Swift.
This error occurs either when toggling motion permission on or off.
Location permission, however, works exactly as expected.
Any ideas/suggestions would greatly be appreciated.
p.s. I am new to iOS and I couldn’t find much documentation on this.
2
Answers
This is expected behaviour. There are some permissions, such as motion and Bluetooth, that when changed in device settings result in the app being terminated by the system.
After the app is terminated the user relaunches the app and the app obtains the new permission state.
You need to add motion & fitness permission in Info.plist file.