I'm developing a video chat app and for technical and privacy reasons, the app must stop sending video when the phone is locked. The camera will stop working there anyway (getting back to the app shows a frozen video).
I'm using UIApplicationExitsOnSuspend, which works well for the home button, but how can I detect the screen lock?
With the camera not working when the phone is locked and the lock not being detectable, this would be a pretty big showstopper in general for video apps, but I haven't found a way to solve this.