Login
From:
Nil Coalescing
(Uncensored)
subscribe
Copy a string to the clipboard in Swift on macOS
https://nilcoalescing.com/blog/CopyStringToClipboardInSwiftOnMacOS
links
backlinks
Roast topics
Find topics
Find it!
To copy a string to the clipboard on macOS, we need to first clear it using clearContents(), unlike on iOS, where UIPasteboard automatically overwrites the existing data.