1 2 Previous Next 16 Replies Latest reply on Jun 22, 2016 3:02 PM by monkeybreadsoftware

    [SDK] Preventing the iphone from sleeping


      I tried to add the following in the Requiredtolink.mm file but it did not work

      #import "UIKit/UIKit.h"

      int main(int argc, char *argv[])


          [[UIApplication sharedApplication] setIdleTimerDisabled:YES];

          startApp(argc, argv);




      It compiles and runs but the device still goes to sleep according to its auto-lock setting.

      Not sure it's possible but if anyone has an idea.....



      I also tried to put the line after the startApp line

        1 2 Previous Next