Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

any one wants to stop "screen auto off and iPhone lock auto" ?

I want this function, but don't know how to do. now solved.

when we got the project set, and exported to mac, we should open the proj by Xcode.

one the left side , we can find many many folders and files. there are my files in codea , also there are many files created by Xcode.

one file name is there are many delegate methods inside, most are empty.

there are two as following , which are empty also.

we should add 2 lines in the 2 methods.(one line in one method) see following.

- (void)applicationDidEnterBackground:(UIApplication *)application { [[UIApplication sharedApplication] setIdleTimerDisabled:NO]; } - (void)applicationDidBecomeActive:(UIApplication *)application { [[UIApplication sharedApplication] setIdleTimerDisabled:YES]; }

then build it .

I am testing on my iPhone7p for 10 mins around. the song and lyric are working well on iPhone and screen is always on , and unit never auto lock .

for your ref.

Sign In or Register to comment.