I have to detect lock & unlock occasions in my swift software.
I’ve tried utilizing App Delegate features like applicationProtectedDataWillBecomeUnavailable (to detect lock occasion) and applicationProtectedDataDidBecomeAvailable (to detect unlock occasion) however they’ve confirmed to be inconsistent.
The perform applicationProtectedDataWillBecomeUnavailable shouldn’t be known as instantly when the cellphone is locked and a number of the lock occasions are being missed altogether.
Are you able to counsel an strategy that may assure the detection of lock & unlock everytime?
(This difficulty shouldn’t be OS particular, and all of the gadgets I’ve examined on have a passcode to unlock it.)