iOS keep sleep timer from enabling
// Prevent sleep | |
[NSTimer scheduledTimerWithTimeInterval:2.0 repeats:YES block: ^(NSTimer * _Nonnull timer) { | |
[UIApplication sharedApplication].idleTimerDisabled = NO; | |
[UIApplication sharedApplication].idleTimerDisabled = YES; | |
NSLog(@"idle timer"); | |
}]; | |
NSLog(@"Initializing python"); | |
Py_Initialize(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment