-
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.
-
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.
-
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.
-
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.
-
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.