I published an app on the App Store

2019-02-06

A while ago I released an app on the iOS App Store: Tågkollen, which translated to English is something like "train check". It uses an open API from the national transport authority in Sweden to display information about train departures.

This is useful, since now and again trains in Sweden might be late (depending on who you ask, this might be interpreted as "every train is delayed by hours"…).

Backstory

A long time ago there was an app that did pretty much the same thing. It wasn't very "native" on iOS, but it mostly did its job. But for various reasons the developer discontinued it, and since it relied on an API provided by the developer the app stopped working.

I found out that the transport agency provides an open API with the same information, and had the idea that I should use this as an excuse to learn Swift and app development. In addition to showing departures from nearby stations, I wanted the app to be suited to the needs of someone (me) who commutes by train between a small number of stations.

It does this by highlighting departures that are bound for any of the user's favorite stations, so it's easy to find the right train in a long list. Another useful feature is that it displays the actual last known delay, in addition to the estimated departure time.

Beginning

I started working on the app a long, long time ago – I think it was when Swift was at version 2 or something like that. It was something I did ten minutes at a time, often on the train home from work. Progress was slow, but it didn't matter much. Learning a new language, a new set of API:s and lots more was interesting in itself.

Challenges

Work progressed in phases, some months I got a lot done, other months I didn't even touch it. But slowly it started being useful, and finally it was good enough to be useful to myself and my wife. Success!

But since I was making such slow progress, the world around the app was changing quite a bit while I was working on it. Most of the changes were in Swift, but thankfully the auto-updates in XCode did most of the work. I think that my code was getting more and more Swift-like with time too, which probably helped a bit to allow the auto-fixes to work as intended.

In general I think that Swift has improved a lot since I started working on this project, and XCode is pretty decent most of the time. It used to crash now and then, but the last few years it's been stable for my uses.

Result

Tågkollen is now available on the App Store , and has actually been so for a while – just like progress on the app itself has been slow, so has progress on this blog post.

I'm waiting for the App Store team to approve my latest update, which will bring the version up to 1.3 with a number of fixes and tweaks. So if you're in Sweden and commute by train, give it a try!