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.

Read more →

App Permissions on macOS Sequoia

In 2012, with OS X Mountain Lion, Apple added a feature called Gatekeeper . It had been available earlier as a command line utility, but this was the first time they made it accessible through System Preferences. Gatekeeper allowed users to control which apps could be installed on their Macs by offering three options: allow apps from App Store, App Store and identified developers or Anywhere. This was the start of Apple trying to lock Macs down, similarly to how iOS devices are locked down, but it allowed power users to install any apps they wanted.

In macOS Sierra (2019), the Anywhere option was removed. It was still possible to open any app by right-clicking and selecting Open. You had to get past a couple of warning dialogs, but it worked. Now, in macOS Sequoia, even that has gone. So how can you open an app that isn’t signed by an identified developer?

TL;DR: You can still run unsigned apps, but it’s a bit more difficult. After trying once, you have to go to System Settings -> Privacy & Security, scroll to the end and click Open Anyway for that app.

Read more →

Xcode Folders & Groups

In Xcode 16, project files and folders are arranged differently in the Project navigator. What used to be a group is now a folder, and this simple change has some interesting effects. At first, I was against the new scheme - in fact in my SwiftUI for Mac 2024 article, I specifically recommended reverting back to the old group method. But after doing some more reading and testing, I think the answer is not so clear cut.

Since Xcode 15 doesn’t work on macOS Sequoia, now’s my last chance to create sample apps with both Xcode 15 and Xcode 16 in macOS Sonoma, and compare the two.

Read more →

Converting an App from Obj-C

A couple of months ago, I got a message from App Store Connect pointing out that one of my iPhone apps - Berio’s Sequenza VII - had not been updated in 3 years and so would be removed from the App Store unless I updated it within 90 days. I disagree with this policy, but small developers like me can’t fight Apple. Since I want the app to remain available, I then had to consider how to update it. Once I opened the app project, I realized that the app was written in Objective-C, so I decided to take the plunge and convert it to Swift and SwiftUI.

Read more →

SwiftUI for Mac 2024

Over the years, I have written articles and sample apps to demonstrate the new features of each year’s SwiftUI updates with particular emphasis on macOS app development. Last year, the major update to SwiftUI was the new data flow system using the Observation framework. I covered that in my article SwiftUI Data Flow 2023 but I didn’t feel there were sufficient UI changes to warrant an update to my usual sample app.

This year, the HTTP Cats app is back! And I’ll cover new features from both WWDC 2023 and WWDC 2024.

Read more →

Book Building

I started writing books for Kodeco when I was asked to contribute some Mac content to SwiftUI by Tutorials . I quickly learned that I really enjoyed long form technical writing but I wanted to create more Mac-specific content. After some negotiations, Kodeco agreed to my plan to write macOS by Tutorials and the first edition was published in April 2022.

As I have written elsewhere, Kodeco has pivoted away from books and into providing multi-modal courses. They agreed to transfer the rights of the macOS by Tutorials book to me as it was out-of-catalog and since then, I have released an update.

When writing for Kodeco, all I had to do was write the text and the accompanying code and images. The people at Kodeco took care of the rest. Many thanks to all involved - I greatly underestimated the work that this entailed! Now that I am self-publishing, I have had to learn how to create the various formats myself. This post is a summary of how I did that.

Read more →

macOS by Tutorials

In April 2022, Kodeco published the first edition of macOS by Tutorials . Nothing stays the same in the world of Apple development, so I started to plan an update after WWDC 2023. At around that time, Kodceo was going through a transformation from being like a library to being more of an educational institution. Their focus is now on multi-modal courses and they are no longer interested in publishing books.

Kodeco agreed to transfer the rights of the macOS by Tutorials book to me, since it was out-of-catalog and since then, I have been working on an update which is almost ready for release. I had hoped to have it out before WWDC 2024, but real-life has a habit of getting in the way, and that was not possible.

The book is now available at Gumroad .

If you previously bought the book from either Kodeco or Amazon, please email me for a 50% discount code. I am unable to provide a free update for the Kodeco version, but I will provide free updates subsequently for the self-published version.

Read more →

Man Reader 2

Several years after I started planning it, Man Reader version 2 is now available. This is a major update with a completely new, modern, user interface and it’s available from the Mac App Store .

Man Reader is a utility app for reading macOS’s man pages. Man Reader allows quick, convenient and easy access to the man pages on your system, useful for programmers, system administrators and tweakers.

Read more →

SwiftUI Data Flow 2023

SwiftUI is a reactive framework where the data drives the UI. In 2019, I wrote a post detailing how I manage the various forms of data flow through a SwiftUI app, and with the help of others in the community, I iterated over this until I had a good understanding of the concepts and which methods you should use when. In 2021, I updated the post to cover the minor changes, but there have been no major modifications since then.

At WWDC 2023, things changed a lot! With the introduction of Swift macros, the SwiftUI team was able to reduce the number of property wrappers need to send data around, and remove a lot of boilerplate code.

For this article, I have re-written my sample app as a Mac app and updated it to use the new data macros.

Updated 10th July 2023 to cover changes in version 3 of all the betas.

Read more →

macOS Apprentice

I’ve written another book! This one is for people who want to get started in macOS development and here it is: macOS Apprentice , published by kodeco.com (formerly raywenderlich.com).

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.

Read more →