I need to setup an ios timer to automatically log out a logged in user to my ios App after a fixed period of time (say 20 minutes.) So the user logs in to the application with a username and password and after 20 solid minutes of inactivity (no interaction with UI) the user should be logged out (asked for username and password again). I want this timer to run even if the application is in background or the iPad is asleep.
It seems (to me anyway) the only way you can do this is to store the time it was last used, and then retrieve it the next time the app has the ability to. You can check the difference and perform logoff then. The only other way would be server side, if your user is logging into a server, and have the app just check with the server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With