I hit SwiftUI’s publishing changes from within view updates purple warning in Xcode 14 when a button in a list updates a model, and after research I conclude it’s likely an Xcode bug rather than a code mistake. Adding a button style modifier silences the warning as a temporary workaround, with newer Xcode versions possibly fixing the issue...
Prompted by a video on effective developer habits, I finally add a linter to my Swift workflow. I cover installing SwiftLint and hooking it into Xcode builds, adjusting rules via a swiftlint.yml config file, and selectively disabling rules with code comments. My approach is to enable all optional rules up front, then decide for each violation whether to change the code or drop the rule...
A walkthrough of adding unit tests to an existing Swift project in Xcode, using my CodeTrimmer macOS utility as the example. I cover adding a unit testing target, writing XCTest functions for the stripSpaces() method, and running the tests to see the results...
My short guide to building a release version of a macOS app in Xcode and finding the resulting .app bundle. I cover creating a new scheme set to Release builds, running the build, and using “Show Build Folder in Finder” to locate the .app file so it can be copied into the Applications folder...
A short how-to on how I customize the default About dialog in a macOS app built with Xcode: add a Credits.rtf (or .html or .rtfd) file to the project, and its contents appear in the dialog after a rebuild...
I explain how to fix Xcode failing to push to GitHub after GitHub stopped accepting RSA keys that use SHA-1. My solution, based on an Apple Developer forum answer, is to switch to a new ECDSA SSH key — with the one step the forum post missed being a restart of Xcode to make it take effect...
While working through Day 32 of 100 Days of SwiftUI — Project 6, a set of animation tutorials rather than a full app — I name a new Xcode project “Project 6 - Animation” and hit seven build errors caused by an unreplaced ___PACKAGENAME macro. Renaming the project without the dash fixes it, and since a web search turned up nothing, I include the exact error message for anyone else who names projects with dashes...
A short note in which I replace QuickTime-based screen recordings with the iOS simulator’s built-in recording, which captures gestures and exports animated GIFs. The technique comes from a linked post by Sarun W...
Here’s a short tip on changing the code font size in Xcode: rather than adjusting each content type manually through the themes preferences, I use Ctrl + Plus and Ctrl + Minus to increase and decrease the font size directly...
A short note on updating to Xcode 14 and Swift 5.7: the update is found in the Mac App Store rather than Xcode’s About dialog. I also show how to check your current Xcode and Swift versions, both through Xcode’s project settings and via the command line, and link elsewhere for details on what’s new in each release...
I share a quick tip on renaming a variable everywhere at once by right-clicking its name, avoiding tedious manual search and replace. I’ve embedded a short demo video...
A short reflection on how Xcode and Playgrounds flag errors continuously as you type, rather than only at compile time. I contrast this with the long builds of earlier tools like Clipper and Visual C++, and describe moving from finding the live error feedback unnerving to enjoying it...