Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe apple should implement some more APIs around clipboard metadata, they could allow queries on content type and length or something without that notification. Or even check the hash of clipboard contents. Anything to protect privacy but still allow useful features.


In fact, they did.

For querying content type, there are pre-existing APIs (e.g. `hasStrings` [1]), which AFAIK don't trigger the banner. In fact, the documentation already recommended using those methods over querying the actual clipboard contents, for performance reasons. But they're relatively new compared to the rest of the UIPasteboard API, having been added in iOS 10.

For going beyond content type, there are new APIs in iOS 14 that let you check if the clipboard contents are a "ProbableWebSearch" or "ProbableWebURL" without triggering the banner. [2] Doesn't seem like there's more flexibility beyond those two options, although I found a thread [3] suggesting that more might be added in the future. I wonder what ProbableWebSearch does.

[1] https://developer.apple.com/documentation/uikit/uipasteboard

[2] https://developer.apple.com/documentation/uikit/uipasteboard...

[3] https://developer.apple.com/forums/thread/649996




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: