AIFeed

Using AI to Back-Port a 2026 Swift App to Mac OS X Tiger

Original text(via HN AI)

The addiction started in 2019.

It was Labor Day weekend, and I was living in Fairfield County, Connecticut. I spotted a PowerMac G4 Digital Audio tower and a matching 17” Apple Studio Display (LCD) for sale at a Goodwill in Queens, New York and had to call it my own.

I made my way down, picked up my order, and started heading back to my apartment in Connecticut to dive into my newest weekend project: restoring and rehabilitating this 18-year-old hardware.

At the time of the PowerMac G4 Digital Audio’s release, I would have been about ten years old. I certainly didn’t have access to a system like this. The entire era of these acrylic sculpted PowerMac towers passed me by with nary an opportunity to own or use one or the matching art-easel-like flat panel monitors. This system would have cost about $2.7k (about $5.1k, adjusted for inflation (October 2026)).

I couldn’t wait to get it home, unpack it, set it up next to my 2018 Mac mini and call it all mine.

As I said, this is where my Mac collecting and restoration hobby started.

One of the surprising things is how well much of this hardware still works. But it’s still actually usable today, just left behind in the attention of software developers.

Wouldn’t it be neat if this hardware was still useful?

Introducing HyperGooey (Legacy)

Of late, I’ve been quite fascinated with the intersection of Server-Driven User Interfaces and hypermedia. The twelve-year-old version of myself was absolutely stunned with Sherlock 3, which made its debut in Mac OS X 10.2/Jaguar in 2002. We later saw some of the same concepts resurface in Apple’s TVML developer technology for AppleTV.

I’ve long sought to recapture that same spirit from Sherlock, a paradigm of the internet that I feel never really got its place in the sun.

Introducing: HyperGooey.

That’s Hyper, as in Hypermedia, and “Gooey” as in Graphical User Interface (GUI).

HyperGooey is a platform that’s been designed to allow nearly anyone to create Mac experiences just by entering content online. You might make a channel as an online resource for your hobby community, an event your organization is running, or just a tiny personal channel. Updates are syndicated out automatically to subscribed clients, a mechanism that will feel familiar to anyone who’s familiar with RSS.

Your eyes do not deceive you, that really is a native Mac application running on Mac OS X 10.4 (initially released in 2005), developed in 2026 and connected to a modern web service.

How did I do this?

Bringing Modern Software Down The Well

I had barely completed HyperGooey for macOS, when I got another breath of inspiration. Just as I had been using AI to help me with all sorts of work on contemporary software projects, could I possibly use AI services to back-port my new Mac application to older versions of Mac OS X, versions of the venerable operating system that might run on, say a Power Mac G3 Blue & White from 1999?

The application I was building for modern macOS was built using AppKit and Swift. AppKit has existed since before Mac OS X was even in public beta. Swift was released in 2014 and has no ability (as far as I know) to run on Tiger or Snow Leopard, two of the most popular install selections for retro Mac enthusiasts. The Swift would have to be converted.

To my surprise, ChatGPT did a phenomenal job with this task, with a few caveats.

XIB view files are difficult for ChatGPT to work with

ChatGPT has a strong preference for constructing views in Objective-C files. This approach is totally valid and does work and is possibly most optimal for its cloud development environment (linux) that lacks Xcode. However it becomes extremely verbose and can really bloat a codebase.

For AppKit projects, modern and classic, I strongly prefer using XIB files to do interface layout. How to reconcile?

I ended up discussing this with ChatGPT, I promised that if it wrote the Objective-C and committed it to a branch, that I’d implement the XIB file and do all of the connections. This was a tedious process, a lot of swapping between machines, reading (skimming) code, giving ChatGPT feedback, crash reports, logs… We were a true pair-programming team.

This did slow my velocity down, A LOT. However, at some point, I expect that the investor money will turn off and AI services may become prohibitive to token-spend on novelty projects like this. In order to maintain these applications after the free/cheap ride has ended, I know I’ll want and need as little code as possible.

Create a cloud development environment

ChatGPT was then able to translate my Swift code into Objective-C by referencing GNUstep APIs. ChatGPT’s ability to create Linux-based cloud development environments was extremely helpful.

I gave the cloud environment access to my modern macOS code repo on GitHub, and then gave it a separate repo to check in the legacy bits of Objective-C.

The cloud environment allowed translation to happen without taking over my primary desktop workspace or needing to install strange dependencies. ChatGPT was able to pull in documentation and references to Cocotron and GNUstep’s APIs to understand old, pre-ARC Objective-C.

When ChatGPT finished with a task, I’d do a git fetch and git pull on my 2008 iMac with Snow Leopard and Xcode 3.2.6 installed, compile, test, debug and report back.

Picking this configuration as my build machine - Snow Leopard on Intel with Xcode 3.2.6 - allowed me to compile a Universal build targeting Mac OS X 10.4, with binaries for both Intel and PowerPC.

I’ve tested the Legacy client as far up as Mac OS X 10.9 with success.

Watch for anti-patterns

I admit, I was basically vibe coding this legacy Mac application. While it mostly worked out, I’ll warn that you need to be vigilant and watch for anti-patterns that might surface in the codebase.

ChatGPT defaulted to a crazy system of a single static layout and delegation to handle swapping between channels and interfaces in those channels. I had to demonstrate and enforce the Model-View-Controller architecture that’s been well defined for AppKit applications from the start.

Surprisingly, it wasn’t a default choice.

We took for granted how much work Apple put into 10.5

Most of us remember the 10.5 update as the update with the shiny dock and the purple space background, but it was so much more.

For example, NSTableView used to be what’s called “cell-based.” When the iOS SDK was released, NSTableView’s cousin, UITableView, introduced the “view-based” concept.

In earlier days, NSTableView had used “cells” (or NSCell), essentially a lightweight stand-in for the NSView class, to draw rows and columns and the data that fit within. NSCell lacks certain capabilities and attributes of NSView - particularly with events and layout customization.

When NSTableView borrowed the “view-backed” table idea from UITableView in Mac OS X 10.7, we got the ability to create rows and columns with custom layouts, and table cells that could understand and work with click events.

I also discovered that NSViewController didn’t exist until Mac OS 10.5. It’s not impossible to use the view-controller pattern on 10.4 and earlier, just a little more of a nuisance.

I found it easiest to manually create a Controller class as a subclass of NSObject and set the controller class as File’s Owner in Interface Builder. This pattern will work/compile on newer versions of Mac OS X just fine, too.

NSOperationQueue is another API missing in 10.4 and earlier. Backgrounding tasks onto threads got a whole lot easier in 10.5 with the introduction of NSOperationQueue and NSOperation. Developers could wrap executable bits of an application, like network calls, onto their own threads, in nicely encapsulated objects, and then add them to an NSOperationQueue for execution off the main thread.

NSOperationQueue was always a little glitchy on 10.5. This was later fixed in 10.6, but in 10.6 Apple released a competing, lower-level API called Grand Central Dispatch.

If building a networked application between these three versions of Mac OS X, you’ll need to be prepared to work (or prompt your preferred LLM) around this issue. It’s entirely possible to ask for your LLM to gracefully degrade from Grand Central Dispatch to RunLoops or pthreads depending on the version of Mac OS X it’s running on.

Why Should You Back Port?

I can’t say that back porting your work to work on old hardware is going to open a great consumer market up to you. In truth, you’re probably better off putting React in Electron and shipping that.

I also understand that back-porting software to PowerPC hardware might be a step too far. But there are still many older Intel Macs hanging around out there that are still acceptably usable, aside from the issue of lack of contemporary software.

Some owners of these older Macs give them a second life by installing Linux, or by bootlegging newer versions of MacOS onto the hardware via OpenCore.

We’ve got the tools to build great modern software and build great legacy software alike, software that’s fast and resource-efficient. So efficient it can be launched on a 350 MHz PowerMac G3 Blue and White, designed, built and shipped in 1999, and that’s exciting as hell.

Subscribe and stick around. I’ll be discussing porting to other platforms (including Windows) next!

Until then, go grab a copy of the newest app for your PowerPC Mac, HyperGooey Legacy.

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by HN AI
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗