Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent ios app kill when changing camera settings in iOS.

Tags:

ios

swift

iphone

In privacy settings, when I change the permissions related to iOS app (Camera or Microphone) and again back to the app then app restarting from initial state and I lost my existing state of work in the app.

Is there any way to save the last state or avoid killing/restart ?

like image 291
Lucky Avatar asked Aug 31 '25 04:08

Lucky


1 Answers

Look at the applicationWillTerminate(_:) method. this will be called before Your app is killed and there is no way to stop it from restart when privacy permission is changed

Also take a look at this answer

like image 133
Sahil Avatar answered Sep 02 '25 17:09

Sahil