Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Objective C: don´t lock iPhone while app is running [duplicate]

I was trying to find out how to disable locking iphone while my app is running but I wasn´t succesful. Do you know if it is even possible? My app is reading values from some hardware in real time and it is really annoying when display is locking all the time. I am not talking about running app in the background... Thank you guys!

like image 439
DanielH Avatar asked Sep 03 '13 14:09

DanielH


1 Answers

Disable the idleTimer on UIApplication:

[UIApplication sharedApplication].idleTimerDisabled = YES;
like image 64
RyanR Avatar answered Oct 18 '22 10:10

RyanR