📱 Hello River on the iPhone: an app in a day

On 1 December I said "I want a SwiftUI app" in the morning. By the evening I was saving links from Safari's Share sheet on my own iPhone, into my own Hello River.

One day, from nothing to a native app on my phone. I have never written Swift for a living, and I didn't write much of it that day either. Claude Code did, while I tried things, asked for changes and ran into the walls Apple builds around iPhones.

In the first post, A River, Not a Library, I wrote about building Hello River: a guilt-free read-later app where links flow out of a river instead of piling up. I ended it with "a native app" as the next thing to try. This is that next thing: why I went native and what the app does.

The Hello River iPhone app, with three sample links grouped by day><

Why SwiftUI, not React Native #

My notes said "React Native app". I changed my mind before any code was written, for one reason: the Share sheet.

The whole point of the app was saving. Until then I saved links with an iOS Shortcut that took four versions to get working. To show up in Safari's Share sheet, an app needs a Share extension, and a Share extension has to be written in Swift whichever framework the rest of the app uses. A home-screen web app can't appear there at all.

Once part of it had to be Swift anyway, the rest followed:

The code lives in an ios/ folder in the same repo as the Cloudflare Worker. I asked whether that was OK. It is: separate repos usually follow team lines, and here the team is me.

What the app does (and doesn't) #

The app does two things: it shows the river, and it lets me save to it from anywhere on the phone.

Three things I asked for and didn't get, because iOS said no:

Building it in the simulator first #

I asked one question before any code: can I try it without my phone? Yes. The iPhone simulator needs no Apple ID, no signing and no weekly reinstall. It even shares the Mac's network, so it could talk to Hello River running locally with wrangler dev, against a throwaway database with four sample links.

So the plan was: build everything in the simulator, and put it on the phone only at the very end.

A few things from that part of the day:

The finished app is about 1,100 lines of Swift in 16 files, with no third-party packages.

Onto a real phone, for free #

You don't need Apple's $99-a-year developer program to put your own app on your own phone. A free Apple ID works. The catch is that the app stops opening after 7 days, and you reinstall it from Xcode.

Two days later: which build is on my phone? #

The next day I changed the river itself. Seven days felt too short: a link saved on a busy Monday was often gone before the weekend that had time for it. Links now stay 21 days, and the river got two new headings, "Last week" and "Earlier", so three weeks of links don't all sit under "Earlier this week".

The web app had it within minutes of deploying. The iPhone app only gets new code when I press ⌘R in Xcode. So I did, and then asked the obvious question: how do I know the phone has the new version?

The honest answer was "look for a Last week heading", which only works if some link happens to be old enough. So we added a line at the bottom of Settings: Built 3 Dec, 11:53 · a59a255. That's the build time and the git commit, stamped in by a small script every time Xcode builds.

By the numbers, and what I learned #

Time to a working app on my phone 1 day
Swift about 1,100 lines in 16 files, no packages
Server changes one word (source: "app")
Tests 9 Swift, plus the 161 that already covered the server and website
Decisions logged for the app 8 (D-055 to D-062)
Cost $0 (free signing, a reinstall every 7 days)

What I learned:

Hello River does what I built it for. I see something worth reading, tap Share, and forget about it. Three weeks later, if I haven't read it, it flows away. It's now in my pocket as a native app :)


← blog