Mobile menu toggle

macOS 16 to clamp down on clipboard snooping by Mac apps

By

macOS 16 clipboard
macOS 16 will change how your Mac's pasteboard works.
Photo: ChatGPT

Apple informed developers of a major pasteboard change coming with macOS 16. It will alert users when apps read the pasteboard without direct user interaction.

The move will ensure apps cannot silently read the pasteboard in the background without you knowing about it.

macOS 16 will put an end to clipboard spying

On iPhone and iPad, Apple shows an alert when apps read clipboard content without user input. Since Apple adopted its name-and-shame approach in iOS 14, hundreds of apps received updates to eliminate clipboard snooping. Apple is now informing developers that it will adopt a similar strategy on Macs with macOS 16. Users will see an alert when an app tries to read the pasteboard without a specific user action.

Apple says the following in its AppKit update to developers:

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.

New detect methods in NSPasteboard and NSPasteboardItem 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 an accessBehavior 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 command defaults write <your_app_bundle_id> EnablePasteboardPrivacyDeveloperPreview -bool yes to enable the behavior for your app.

Like on the iPhone and iPad, many Mac apps silently scrape the clipboard content, posing a risk to user privacy. But many apps also need access to the pasteboard to work properly. This explains why Apple has come up with the new NSPasteboard and NSPasteboardItem APIs. It will allow apps to examine the data on the pasteboard without being able to read it and triggering an alert.

While some users might find this upcoming change in macOS 16 annoying, it’s a step in the right direction, keeping user privacy in mind.

Newsletters

Daily round-ups or a weekly refresher, straight from Cult of Mac to your inbox.

  • The Weekender

    The week's best Apple news, reviews and how-tos from Cult of Mac, every Saturday morning. Our readers say: "Thank you guys for always posting cool stuff" -- Vaughn Nevins. "Very informative" -- Kenly Xavier.