tags:

views:

42

answers:

1

Can anyone suggest me how to set sleep time in iphone application? so that after that time iphone goes in sleep mode.

Thanks in advance.

A: 

I don't think you can do this in the current OS without getting into private API's (which will get your app rejected).

You might be able to turn off auto-lock and fake your own "unlock" swipe screen though

// turn off auto-lock
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];

and then create a XIB to fake an unlock screen. Not sure how apple feels about you doing that though, I'm just speculating.

iWasRobbed