macOS 16 will warn when apps access pasteboard (aka clipboard) without user interaction
Similar to iOS handling of pasteboard
AppKit updates state upcoming changes with pasteboard access in macOS apps.
macOS pasteboard privacy
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. This behavior is similar to how
UIPasteboard
behaves in iOS. Newdetect
methods inNSPasteboard
andNSPasteboardItem
make it possible for an app to examine the kinds of data on the pasteboard without actually reading them and showing the alert.NSPasteboard
also adds anaccessBehavior
property to determine if programmatic pasteboard access is always allowed, never allowed, or if it prompts an alert requesting permission. You can adopt these APIs ahead of the change, and set a user default to test the new behavior on your Mac. To do so, launch Terminal and enter the commanddefaults write <your_app_bundle_id> EnablePasteboardPrivacyDeveloperPreview -bool yes
to enable the behavior for your app.
App developers have time to prepare for upcoming changes, if app relies on accessing pasteboard.
References: