-
Moving to Eleventy
I have been running this blog since 2014 and it's seen several major changes along the way. I started with WordPress but it felt slow and clumsy, so in 2015 I entered the world of static site generators and transferred to Jekyll. That worked for a couple of years until Jekyll was updated from version 2 to version 3 which broke my setup. At that point I converted to Hugo which has worked fine for more than six years.
But as with Jekyll, updates broke my site and I didn't know enough about how it all worked to fix it. As a temporary measure, I reverted to an old version of Hugo which got everything working again, but this was not a long term solution.
After considering a number of options, I decided to try Eleventy and that's what you're looking at right now.
-
macOS Apprentice Update
The second edition of macOS Apprentice has been released!
If you're a beginner or near-beginner who wants to start learning Swift, SwiftUI and AppKit for building Mac apps, then this is the book for you.
This edition has been updated for Swift 5.9, macOS 15 and Xcode 16.2.
-
The Mac Menubar and SwiftUI
When you create a Mac app using SwiftUI, you get the standard Mac menubar by default. The
commands
modifier lets you customize the menu bar, either by adding, replacing or removing items and menus. You can even add some presets which give a consistent way to add groups of common items.The problem comes when you want to communicate back to the SwiftUI views from the menubar. How can you direct your menubar commands to the correct destination? AppKit uses the responder chain, so it effectively broadcasts any menubar message until something handles it. This might be an edit field, a view, a window or even the app itself. SwiftUI doesn't work like this, but I've explored multiple possibilities for passing messages from the menubar to the active window.
-
macOS by Tutorials 3.0
macOS by Tutorials Edition 3.0 is now available!
The book is available for purchase or update at Gumroad.
If you previously bought the first edition of this book from either Kodeco or Amazon, please email me for a 50% discount code.
If you already bought the second edition from me via Gumroad, this is a free update that you can download from your Gumroad library.
-
Swift Format in Xcode
In Xcode 16, Apple quietly introduced the ability to format your Swift files using Swift Format. I'm a long-time user of SwiftLint, but having such a tool built into Xcode would be a great convenience, so I decided to give it a try. Here is my description of why I use such a tool, how well it works compared to the alternatives, and how I configured it for my own purposes.