»
S
I
D
E
B
A
R
«
Stop The Device from Sleeping Programmatically
Apr 3rd, 2009 by Anish Kumar

Add the following line of code to stop the iPhone from going to sleep mode. (Use it judiciously, it will drain the device battery.)

[[ UIApplication sharedApplication ] setIdleTimerDisabled: YES ];