Apple has updated the AppKit documentation to inform developers about a significant change coming to the macOS pasteboard, the system-level mechanism for transferring data between applications and Apple devices.
Here’s how it’s going to work:
Currently, macOS apps can programmatically read from the pasteboard (Apple’s term for the clipboard) without the user’s knowledge or prior permission. This contrasts with iOS, which has displayed privacy alerts since iOS 14 whenever an app attempts to read pasteboard data without user input.
Soon, as noted by Sindre Sorhus on Bluesky, Apple will introduce new detect
methods in NSPasteboard
and NSPasteboardItem
. These methods will let apps check what kinds of data are on the pasteboard, but without actually reading the contents and, thankfully, triggering the alert.
Moreover, users will be able to control pasteboard access on a per-app basis: they can allow it always, block it entirely, or receive a prompt each time an app tries to access it.
Here’s how Apple explains it:
Prepare your app for an upcoming feature in macOS that alerts a person using a device when your app programmatically reads the general pasteboard. The system shows the alert only if the pasteboard access wasn’t a result of someone’s input on a UI element that the system considers paste-related.
The changelog informs developers that they can adopt these APIs ahead of the change, and how they can test the new behavior on their Macs. It is unclear how or if this change will affect clipboard managers.
FTC: We use income earning auto affiliate links. More.