I have a sensitive app the client wants to logout when it enters the background and show the login screen when it enters the foreground. It seems to make the user relogin when they get a low battery warning at 20, 10 and 5%. Has anyone encountered this or coded around it? I am coming up empty in all my searches for events that occur when the low battery warning is shown.
Share
It seems that you need to move your logout logic from
-applicationWillResignActive:or-applicationDidBecomeActiveto-applicationDidEnterBackground:orapplicationWillEnterForegroundin your App Delegate.If your app does not need to support backgrounding then the best option may be to disable it by setting
UIApplicationExitsOnSuspendtoYESin the App’s plist.