Friday, January 02, 2026

Developing for Apple platforms - we're in a good place

My most popular app, WSPR Watch, is now 14 years old and it's not surprising that the underlying technology has changed a lot in that time. It started out in Objective C using UIKit, was ported to Swift over time and most recently migrated to SwiftUI.

I am not a brilliant programmer, I know this because I've met and worked with some who are - they are amazing. I'm a plodder. It takes me a long time to get comfortable with a new language, new framework, the right ways to avoid problems with multi-threaded code.

Recently, I re-watched a Worldwide Developer Conference (WWDC) video on migrating to Swift 6 which has new, compiler based, features for letting me know when something I'm doing is dangerous in a multi-threaded program. When I enabled Swift 6, Xcode showed me dozens of errors. The video gave good advice: "Don't Panic". I worked through the complaints and in the end my program not only worked but a subtle bug in the map display was gone!

The other day, I read a brilliant post about Swift Concurrency, which not only helped me understand what I was doing but also showed how easy it is to do network requests with URLSession. Up until now I've been using a thirdparty package called Alamofire which provided a nice wrapper over the underlying code. Apple has cleaned things up and it all works nicely with async/await.

With the help of ChatGPT, (which gave me useful example code), I manually converted one of my network loader classes to no longer use Alamofire. The code was shorter and clearer after this effort.

LLMs are fantastic for programmers. Normally when I need to do something new, I have to read documentation, watch WWDC videos, try to find recent sample code, and generally mess around until I figure it out. An LLM can give me a code snippet that does what I want and that's a great start. They aren't perfect but they're close.

After manually porting my network code I thought I'd try the built-in AI in Xcode on one of the other data loaders. I opened the file and asked it to modify the code to use URLSession instead of Alamofire. It did and the code was better than mine in a few ways. 

It's taken time for SwiftUI to mature but today I feel more productive than ever and, with the help of the LLMs, can start projects I never would have attempted. We are in a good place as developers for Apple platforms.