How I Built an iPhone Theft Detection System Using Motion Sensors and Screen Time APIs cover art

How I Built an iPhone Theft Detection System Using Motion Sensors and Screen Time APIs

How I Built an iPhone Theft Detection System Using Motion Sensors and Screen Time APIs

Listen for free

View show details

This story was originally published on HackerNoon at: https://hackernoon.com/how-i-built-an-iphone-theft-detection-system-using-motion-sensors-and-screen-time-apis.
How I built phone snatch detection for iOS using accelerometer, Screen Time API, and a background location hack. No ML, no hardware.
Check more stories related to programming at: https://hackernoon.com/c/programming. You can also check exclusive content about #mobile-app-development, #ios-app-development, #swiftui, #mobile-security, #theft-detection-software, #ios-background-tasks, #cmmotionmanager, #iphone-security, and more.

This story was written by: @olegmmv. Learn more about this writer by checking @olegmmv's about page, and for more stories, please visit hackernoon.com.

Android shipped Theft Detection Lock in 2024. Apple still has nothing. I built a free iOS app that detects phone grabs via accelerometer and locks selected apps using Screen Time shields. The technical rabbit holes: CMMotionActivityManager turned out useless (reports "Unknown" instead of "Running"), background execution requires a location manager hack to keep the process alive, Screen Time API has two token types you need to apply simultaneously, and Face ID can't be called from shield extensions. The app works but has one structural weakness – deleting it removes the shields.

adbl_web_anon_alc_button_suppression_c
No reviews yet