iPhone – Prevent iPhone Application From Sleeping

By default, there is an idle timer in iPhone such that it will go to sleep mode if it is idle for a period of time.

So if you don’t want your iPhone Application goes to sleep mode automatically, you can disable the idle timer by the following.

[[UIApplication sharedApplication] setIdleTimerDisabled:YES];


Just add it in the applicationDidFinishLaunching method.

Done =)

Reference: How to prevent the iPhone from sleeping (when running your application)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.