Building a Universal Mini vMac Application This project demonstrates a collection of techniques for consolidating various Mini vMac variations into one application, enabling better code reuse and simplifying maintenance.
Mysterious Runtime Crashes in Swift 6 Language Mode Swift 6 language mode promises compile-time stricter concurrency checking, aimed at preventing and eliminating data races, runtime memory corruption, as well as other common but hard to debug issues. While adopting the new language mode can be a bit of a challenge for larger or less modular projects, Swift 6
Implementing a Modern SwiftUI Circular Progress Bar & Control When I first wrote PZCircularControl in 2019, SwiftUI was still in its early days. The framework has matured significantly since then, introducing new features that enable interactions that were previously only achievable by dropping down to the Kits. Recently, I revisited the codebase and decided that a complete refactor of
NSDrawer, Child Windows, and Modern macOS Applications NSDrawer is undoubtedly one of the more creative and iconic use cases for so-called "child windows" on macOS. Despite that, drawers have been deprecated in macOS 10.13 and seemingly forgotten since then. You can hardly find any use of drawers in any macOS applications these days. Visiting
A Time Capsule from NeXT Computer, Inc. A couple of months ago I took a trip to Fortuna, CA – a roughly 5 hour drive from my home in San Jose – to pick up a Macintosh Quadra 700 for my modest albeit growing collection of vintage hardware. From what I gathered, the person selling the machine finds and
SwiftUI's handling of the Mac menu bar is still pretty bad While trying out a few things around the SwiftUI document handling and lifecycle in a macOS application, I came across a pretty bad issue. Not only did it not do as the API promised, it actually messed with the menu in ways that would be unrecoverable to a SwiftUI lifecycle
Fixing “Too many HTTP redirects” errors with Cloudflare + Ghost blog I was recently working on moving this blog to a new domain (philz.blog). It is set up as a Ghost self-hosted instance on a DigitalOcean droplet. And, as usual, I wanted Cloudflare in front of the traffic. So, I set up the new domain, then SSH'ed into
Synchronizing ScrollViews using SwiftUI Synchronizing the scrolling positions between 2 (or more) ScrollViews in SwiftUI is a fairly common problem. There are a few questions and answers online covering it. Some solutions are passable, but none are satisfying. With the release of iOS 18.0 and macOS 15.0, SwiftUI has gained a few
SwiftUI's New Geometry Modifiers & Best Practices: onGeometryChange, onScrollGeometryChange, and More SwiftUI has recently introduced a family of geometry observation APIs: onGeometryChange, onScrollGeometryChange, and onScrollPhaseChange. The former is back deployed all the way back to iOS 16 and macOS 13 Ventura. These new modifiers are a pretty big deal in a few ways.
SwiftUI FocusedValue, macOS Menus, and the Responder Chain On macOS, you can use the SwiftUI FocusedValue API to achieve a behavior similar to that of the Responder Chain, including autoenabling menu items.