A perfect little feature: Universal Clipboard

Apple product photo for Universal Clipboard, showing an iPhone next to a MacBook Pro, with an image selected on the iPhone and 'Copy' highlighted in the pop-up menu, and that same image in a Pages document on the Mac, implying it was just pasted there.

Perhaps in karmic balance of my previous post critical of one of Apple’s APIs, I want to highlight an Apple OS feature that I use every day, that ironically is so simple, obvious, and reliable that I almost never stop to appreciate it. Universal Clipboard basically just means you can copy something on one device… Read more

-fomit-frame-pointer

Explanatory diagram of frame pointers, showing a link from the x86-64 register %rbp to the start of the current frame, which holds the prior value of %rbp that points to the top of the previous frame, and so on.

This is an elaboration of a post I made in a Swift Forums thread, SE-0419: Swift Backtracing API. The question was raised whether an official Swift backtracer should try to support code that doesn’t use frame pointers. Which immediately raised the question – in my mind – of if anyone is still using the “optimisation”… Read more

NSImage is dangerous

Screenshot of an excerpt from Xcode's debug console showing the output of AddressSanitizer, having detected data race involving NSImage.

NSImage is formally documented as largely not thread-safe: The following classes and functions are generally not thread-safe. In most cases, you can use these classes from any thread as long as you use them from only one thread at a time. Check the class documentation for additional details. Apple’s Threading Programming Guide > Appendix A:… Read more

Reminder: macOS system frameworks binaries are hidden (since Big Sur)

Every now and again I’ll go to do something really innocuous with an Apple framework, like disassemble it in Hopper or check the link headers. And every. single. time. I forget that Apple did some really weird shit in Big Sur, and removed the binaries. $ ls -lh /System/Library/Frameworks/AppKit.framework/Versions/Current/AppKit ls: /System/Library/Frameworks/AppKit.framework/Versions/Current/AppKit: No such file or… Read more

Secret Sonoma design lead: Barbie

macOS Sonoma is in so many ways a dumpster fire. It’s the worst Apple OS update I can remember (although admittedly there’s been some real stinkers over the years, so maybe I’m overlooking some repressed memories). There was of course the bug whereby encrypted external drives no longer mounted automatically. That was pretty special, because… Read more