Get notified when pasteboard did change

How to listen for clipboard changes

Today I was thinking about apps like Clippy and other clipboard managers, I thought: “For sure swift provides notification for the copy event”

WRONG! I sadly discovered that on MacOS unlike on iOS you can’t listen for NSClipboard changes.

So I wanted to write a small snippet of code that…

Federico Vitale

FrontEnd Engineer. Secretly in love with strong typed languages. Sharing what I learn 🇮🇹

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store