iPhone unity3D idleTimer disable

Hello All,

I want to disable the iPhones idleTimer in iPhone unity3D.

I write , [UIApplication sharedApplication].idleTimerdisabled =YES; in unity Xcodeproject in ApplicationDidFinishLaunching method but it is not working.

Please help me.

In the latest version of unity, use

Screen.sleepTimeout = SleepTimeout.NeverSleep

Are you getting a compile error or simply not seeing the expected behavior? I just google the concept and here's an Apple Discussions thread talking about the same issue: http://discussions.apple.com/thread.jspa?threadID=1651649

It says the device won't sleep when you have it connected to XCode.

If that thread doesn't answer your question, give us more details so we can help.

You can add this line to the Start method of one of your components.

iPhoneSettings.screenCanDarken = false;

http://unity3d.com/support/documentation/ScriptReference/iPhoneSettings-screenCanDarken.html