You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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:
I'm not an Obj-C expert but happy to PR this if it helps?
The text was updated successfully, but these errors were encountered: