
Ask HN: How do we track locking on iOS? - SapienTech
My startup is working on a gamified focus timer app, and we need to be able to distinguish between when a user leaves the app and when they lock their phone. This is so their focus timer session will fail if they leave the app but not if they simply lock their phone. We&#x27;re stuck on this. Any ideas?
======
sushid
You’re describing what the Forest productivity app can already do so it’s
definitely possible.

Perhaps you can reverse engineer it and find out what API they’re using as a
workaround?

------
cimmanom
There are some APIs that iOS does not expose. Most of them deliberately.

