Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable mode idle while iOS app is running

Does anybody know how to disable mode devices idle while app is running? I wrote iOS app with webservices, but when screen saver starts, i have synchronization fall.

Thanks

like image 404
Salmo Avatar asked Aug 27 '12 14:08

Salmo


Video Answer


1 Answers

Assuming by "screensaver" you mean disable the devices idle timer that turns off the screen, you can use this simple line:

[UIApplication sharedApplication].idleTimerDisabled = YES;
like image 61
Mick MacCallum Avatar answered Oct 17 '22 03:10

Mick MacCallum