Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPad: Seutp a Timer in IOS app to deauthorize a logged in user even when app in background

Tags:

ios

ipad

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.

like image 808
MikeN Avatar asked Jan 26 '26 06:01

MikeN


1 Answers

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.

like image 138
Truk Avatar answered Jan 28 '26 19:01

Truk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!