I recently submitted a new binary to the app store and sent it in for review and it was immediately rejected with the following message. "Unsupported operation - Apps are not allowed to listen to device lock notifications.". After some digging around I found out that we can't use "com.apple.springboard.lockstate" to figure out the lock state.
Essentially, my app needs to know how the user left my app. Whether it was pressing the home button, lock button, leaving the app through hitting another app's notification, etc. Is there any way of achieving this? I started investigating to see if my app were to run in the background, maybe we could check the application state to figure it out. That's as far as I got, I was wondering if anyone had anymore insight on this