Automatically exit the application after 10 minutes of interaction

An example would be if a user started his phone with an open and running application, but there were no interactions with the application in the last ten minutes, the user should log out and log back in. Is this a parameter that can be defined?

+3
source share
2 answers

The parameter is not predefined. You must check yourself using the timer method and / or by recording the time of the last user interaction.

It is completely legal for an application to display its UIView login (again) after 10 minutes, but do not try to exit the application.

+2
source

/ . , ...

  • , (NSTimer).

  • timer_reset .

  • 10 (0);

NSTimer.

+1

Source: https://habr.com/ru/post/1770670/


All Articles