I have a today extension that displays a timer. I want to pause the timer when the screen is locked, but can't figure out how to detect if the screen is locked.
I tried doing this but the file is always readable even when the screen is locked: Finding out if the device is locked, from a Notification Widget
I was able to do this in my app using this but am unable to implement it in a widget: How can I detect screen lock/unlock events on the iPhone?