How to detect if device has gone to sleep/wake/lock/unlock [MacCatalyst] #17744
Unanswered
fireking220
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have some Dispatch Timers in my app that get paused when the computer goes to sleep/lock on Mac. I would like to be able to detect wake/sleep/lock/unlock for mac so that I can restart these timers with the time remaining. For example
Expected:
Actual:
I have tried this, but cant seem to get the callbacks set up correctly to the notifications
Is there any way to do this, or is it currently impossible because of MacCatalyst?
Beta Was this translation helpful? Give feedback.
All reactions