AnsweredAssumed Answered

[SDK] Preventing the iphone from sleeping

Question asked by sfpx on Jun 21, 2016
Latest reply on Oct 21, 2017 by sfpx

I tried to add the following in the 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