I am getting the following binary error after submitting to the App Store: "Unsupported operation - Apps are not allowed to listen to device lock notifications."
I am using Darwin notifications to monitor the device lock state but Apple has discouraged it. Another approach is to use protected data.
But applicationProtectedDataWillBecomeUnavailable(_:)
does work but only if the device is password protected. Is there any way to detect lock state if the phone is not password protected?