“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

Bipolar customer support

Consider these two examples involving Flickr, that occurred within just one day of each other. Nice gal Amanda I submitted the following feedback, not really expecting much of it. In fact, I fully expected some useless, boilerplate response that completely ignored the point and directed me to the upload requirements page (despite it being the… Read more

Swift’s native Clocks are very inefficient

Screenshot of Instruments showing the outline view for a Time Profile, expanded to show dozens of spurious, overhead functions taking up the vast majority of the runtime.

By which I mean, things like ContinuousClock and SuspendingClock. In absolute terms they don’t have much overhead – think sub-microsecond for most uses. Which makes them perfectly acceptable when they’re used sporadically (e.g. only a few times per second). However, if you need to deal with time and timing more frequently, their inefficiency can become… Read more