Search Unity

iOS app crashes in the background, when I change permissions

Discussion in 'iOS and tvOS' started by GeorgeMincila, Jan 17, 2022.

  1. GeorgeMincila

    GeorgeMincila

    Joined:
    Feb 28, 2016
    Posts:
    36
    I implemented a plugin to check and request for permissions to use the camera on an app using AR Foundation.

    When the user Denies permissions, inside the app, I show him a button to go to Settings and manually change the permissions in order to go forward.
    - I tap the Settings button, my app enters the background and I get the phone Settings app.
    - If I just go back to my app without doing nothing, there is no crash, all is fine
    - However, if I toggle the permissions to ON, in the phone Settings app, my app that is in the background crashes immediately. I can see this message in the xCode console:
    "Message from debugger: Terminated due to signal 9"
    - Going back to the app in this case restarts it from the beginning

    Any ideas on what is happening, what can cause such a thing? Not sure where I should look.