I’m designing a Watch app that that has uses a PIN in order to create a token session. The goal is to detect when the watch is locked/removed from the users arm in order to know when to invalidate the token and prompting to enter their PIN again when they want to use the app. If the watch stays on while they have a valid token, they won’t be asked to enter their PIN. I was wondering if there was a way to detect if the user locks/takes off their watch in order to do this? Any help/advice would be great!
Asked
Active
Viewed 833 times
1 Answers
3
Unfortunately Apple's wrist detection API is not available to the public, which means your app can't be notified whether the watch is on the wrist or not. This is is most plausibly for safety and privacy reasons as public info whether the watch is on wrist or not could yield malicious apps.
Nevertheless, depending on how your app works, I'd recommend you to look into tracking arm movement and using that data for locking the app since the accelerometer and gyroscope values are available for use.
I'd refer to the following Detect physical movement of iPhone/Apple Watch for detecting hand movement

aaaakshat
- 809
- 10
- 19