I'm getting an issue where this component crashes a (legacy) app because the operation to access and set setIdleTimerDisabled isn't on the main thread.
I have fixed it in my fork by wrapping the methods like so:
dispatch_async(dispatch_get_main_queue(), ^{
// Acquire a reference to the local UIApplication singleton
UIApplication* app = [UIApplication sharedApplication];
// If the timer is not disbled, prevent sleep
if (![app isIdleTimerDisabled]) {
[app setIdleTimerDisabled:true];
...
});
I'm not an Obj-C expert but happy to PR this if it helps?
I'm getting an issue where this component crashes a (legacy) app because the operation to access and set
setIdleTimerDisabledisn't on the main thread.I have fixed it in my fork by wrapping the methods like so:
I'm not an Obj-C expert but happy to PR this if it helps?