3 ms·
How are they implementing the screenshot detection on iOS? I searched and found some stack overflow posts, but they all seem stumped (especially for iOS 6) ht
by 0x0 14y ago
How are they implementing the screenshot detection on iOS?
I searched and found some stack overflow posts, but they all seem stumped (especially for iOS 6)
http://stackoverflow.com/questions/13484516/ios-detection-of-screenshot http://stackoverflow.com/questions/13484516/ios-detection-of...
http://stackoverflow.com/questions/2121970/notification-of-or-detecting-screenshot-being-taken/2122117#2122117 http://stackoverflow.com/questions/2121970/notification-of-o...
- namank 14y agoElaborate please...screenshot detection?
- 0x0 14y agoHaven't had the time to play much with this app, but if it's anything like Snapchat, the idea is to send photos that self-destruct after 5-10 seconds. Since there's absolutely no (known) way to actually prevent taking screenshots on iOS, the next best thing they implemented is "screenshot detection", which notifies the sender that the recipient did take a screenshot.
- MartinCron 14y agoNor is there a way to keep people from taking a picture of an iPhone screen with a secondary camera. The promise of "self-destructing" pictures seems like a disaster waiting to happen.
- Xuzz 14y agoI looked into how SnapChat does it, it's pretty simple: http://blog.chpwn.com/post/38491252231 http://blog.chpwn.com/post/38491252231
- 0x0 14y agoOooh, thanks for the explanation. I figured it had something to do with touches dropping off (the other posts mentioned it, and it's kind of obvious since they ask you to long press to view). But I thought the touchesCancelled would be too unreliable, with push messages, system notifications, incoming calls, or just dragging the finger out of the screen. How would you detect the lack of WillEnterBackground/DidResignActive to avoid false positives? Just set a timeout and send a "screenshot!" notification if the timeout expires without going to background?
- Xuzz 14y agoYeah, probably. Anything that gets in front of the app should call one of those two, and do so pretty immediately. A timer for a second or so later should be pretty safe.