SwiftUI drag & drop does not support file promises

SwiftUI doesn’t offer anything equivalent to NSFilePromiseProvider, i.e. to write data to the drop destination. You have to ditch SwiftUI and use AppKit’s drag & drop APIs instead. FB13583826. Is that it? I know that’s not a very helpful in some sense, but I wasted days trying to figure out how to implement this very… Read more

Mac app sandboxing interferes with drag & drop

Failed to get a sandbox extension Right from there, you know you’re going to have a bad day. 😔 Then you try to actually use the file dropped on your app, and you get: Upload preparation for claim 1C0F9013-4DEB-4E5D-8896-F522AA979BA6 completed with error: Error Domain=NSCocoaErrorDomain Code=513 ““Example.jpg” couldn’t be copied because you don’t have permission to… 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

SwiftData pitfalls

I’ve been exploring SwiftData lately, and I’ve been unpleasantly surprised by how many sharp edges it has. I’m going to try to describe some of them here, so that hopefully others can avoid them (or perhaps be dissuaded from using SwiftData to begin with). I’m using Xcode 15.0.1 (Swift 5.9) on macOS 14.1 (Sonoma). Background… Read more

Swift on Raspberry Pi

After the horrible experience just acquiring, installing, & configuring a basic Raspberry Pi, I was anticipating much effort – likely ending in failure – to get Swift working. I was pleasantly surprised. There are multiple ways to do it, apparently. One would think that there’d be the correct & working packages already available through apt,… Read more

The dumpster fire that is the Raspberry Pi

For a couple of little home projects I need an always-on computer. In an ideal world, perhaps, this would be something like a Mac Mini. Powerful [enough], easy to install & maintain, runs anything & everything (including anything Linux through Docker or at worst a straight VM). Unfortunately, Mac Minis are surprisingly expensive – even… Read more