presentedWindowStyle is not windowStyle

This post is mostly to herald a pretty good Apple bug report response, which as we know is a too-rare event. But it might also help others with this confusing SwiftUI API. What’s the difference between presentedWindowStyle(_:) and windowStyle(_:)? Well, one does something, the other doesn’t, basically. I tried using the former, and observed that… Read more

“Import from iPhone or iPad” doesn’t work when any view contains a SwiftUI Toggle

Screenshot of the File menu with the "Import from iPhone or iPad" submenu expanded, and all items therein are disabled.

This is a public reposting of FB14893699, in case it’s helpful to anyone else or especially in case someone else has seen this too and knows how to work around it. If any view in the [active] window contains a Toggle – even one that’s disabled or hidden – then Continuity Camera (re. ImportFromDevicesCommands and… Read more

NSPasteboard crashes due to unsafe, internal concurrent memory mutation when handling file promises

This is a public reposting of FB14885505, in case it’s helpful to anyone else or especially in case someone else has seen this too and knows how to work around it. NSPasteboard mutates itself simultaneously from the main thread and the global concurrent Dispatch pool, w.r.t. to its internal type cache. This is surprisingly trivial… Read more

Calling Swift Concurrency async code synchronously in Swift

Sometimes you just need to shove a round peg into a square hole. Sometimes that genuinely is the best option (or perhaps more accurately: the least bad option). I find my hand is often forced by APIs I don’t control (most often Apple’s APIs). e.g. data source or delegate callbacks that are synchronous and require… Read more

Red Light

Photo of the Canary Wharf traffic lights, a ridiculous, confusing mess of lights that looks like an AI-generated monstrosity but is apparently real

Famously, Google used to have a practice dubbed “20% time”: about one day a week, engineers were {expected ⊻ encouraged ⊻ permitted ⊻ tolerated ⊻ known} to work on something other than their nominal work; something they themselves chose. Circa 2011, not long after I joined Google, I pitched a 20% project idea to my… Read more

Sync Now

A macOS button labelled "Sync Now" surrounded by love hearts.

I’m very glad Apple’s Messages team somehow snuck this one little button past the corporate bureaucracy (Apple infamously likes to pretend their software is infallible and therefore doesn’t need things like useful error messages or rectification tools). It’s of course not great that iMessages don’t reliably sync between Apple devices to begin with, but at… Read more