Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Stop Gideros Player from sleeping on iOS — Gideros Forum

Stop Gideros Player from sleeping on iOS

moopfmoopf Guru
edited February 2012 in General questions
The Gideros player app on iOS sleeps after some idle time on the iPhone/iPad. It's a little annoying whilst testing as I keep having to unlock the device.

So here's a tip if you want to stop the Gideros Player from sleeping on your iPhone/iPad. Open the player project in xcode, and go to the GiderosiPhonePlayerAppDelegate.mm or GiderosiPadPlayerAddDelegate.mm (depending on which of the projects you have loaded). Find the following line (it's not far from the top):
CGRect bounds = [[UIScreen mainScreen] bounds];
Either below or above that line add the following line:
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];
Compile and load onto your device. The player will no longer sleep after it's been idle for a little while :)

Comments

  • :D Gideros has already a command for this:
    application:setKeepAwake(true)  -- disable screen dimming and device sleeping
  • Another doh! from me then ;) Looking for the wrong term in the documentation again.
Sign In or Register to comment.