An iOS & Swift development blog by Stuart Breckenridge.

Rewriting Singapore Transit

Every day, almost, I use the Singapore public transit system. It’s what piqued my interest in using the Land Transport Authority’s API. I released Singapore Transit in April 2018 and then gave it a visual refresh in October. I did very little work on the database or server side during those updates.

I’ve started work on Singapore Transit²1 and aim to release it around September with iOS 13. I’m looking to include:

Swift 5

Absolutely zero user benefit here, but it will tidy up some of the code that interacts with the API. For example, the new Result type being used in completion handlers:

public func getBusArrivals(at stop: String, completion: @escaping (Result<[Services?], Error>) -> ()) {

Background Downloads

Currently, Singapore Transit requires an app update from the App Store in order to receive new bus stop and route data. The aim for Singapore Transit² is that this will be automated via background downloads.

As an aside: Apple Maps, and to a lesser extent, Google Maps, aren’t updated as fast as the bus stop data. As such, bus stops and routes appear in areas where there are no roads. I can’t stop that.

Bicycle Rack Data

Bicycle Rack data will be available in Singapore Transit². This is, unfortunately, static data, so it doesn’t show live availability of bikes that can be used or spaces in the rack.

Theme Support

Singapore Transit² will support themes.


Singapore Transit² is very much a version 1 of a new app. It will not use the same code base as Singapore Transit. There will not be a migration path.

  1. Yep, it has a superscript ². ↩︎