Case study · Transportation

WARP

A ride-hailing platform for Norway: a rider app for trips, taxis and hourly rentals, and a driver app that handles onboarding. I set the architecture both apps are built on. Neither has launched publicly yet.

Role
iOS Architect and Lead
Platform
iOS (SwiftUI) · rider and driver apps
Stack
Swift · SwiftUI · Google Maps/Places · URLSession · Keychain
Status
~17K lines of Swift · pre-launch
Overview

Two apps on one foundation

WARP is a ride-hailing platform for Norway. The rider app lets someone book a fixed-route trip, call a standard taxi, or rent a car with a driver by the hour, then follow the driver on a live map, message them and pay in the app. The driver app is what a driver has to get through first: phone and email verification, an ID document, an address and a registered vehicle.

I set the architecture and technical direction for both apps: the shared networking, auth and Keychain layer, the repository pattern each domain sits behind, and the platform decisions each app shipped against. From late 2025 I also directed an intern who built much of the rider app's feature work on that foundation.

Both apps are still before public launch, so there are no user numbers here. What is real is the architecture and how it held up during a busy month of fixes.

The problem

Real-time without a real-time channel

A rider needs one app for three kinds of transport, a live map of whoever accepted the request, and payment. The backend had no push or streaming channel, so everything that looks real-time had to be rebuilt by polling. A driver needs a completely separate funnel before they can see any rider at all.

Two different jobs, two apps, one system underneath. The real requirement was a networking, auth and session foundation solid enough that the second app did not have to be a rewrite of the first.

Architecture

A shared core behind two apps

The driver and rider apps are separate Xcode targets talking to separate services. Under both sits a networking, auth and Keychain layer that was written once and then copied into each.

WARP architecture: a driver-onboarding app and a rider-trip app, each talking to their own plain-REST service on EC2, sharing a networking/auth/Keychain core that was authored once and forked into both. Shared networking core Authored once · forked into both apps DRIVER APP · SWIFTUI Onboarding Screens 11 steps: phone → ID → address → vehicle ViewModels Per-screen form + call state Repositories Auth · Car · Address · Vehicle · Profile · Country BACKEND · EC2 · EU-NORTH-1 Driver Service REST · plain HTTP Rider Service REST · plain HTTP RIDER APP · SWIFTUI HomeViewModel Map, trip type, polling, sheet state, one class GoogleMapsView + Places SDK Map render, geocoding, autocomplete Repositories Trip · Taxi · Rental · Chat · Payment REST REST
Both apps talk to their own REST services, but they share a networking, auth and Keychain core that was written once and copied into each.

Driver onboarding is eleven screens, each with its own view model, pushed onto one NavigationStack as cases of a VerificationScreen enum. They call seven small repositories (auth, car, address, vehicle, profile, country, onboarding) that all go through one generic NetworkService.

A rider's trip runs through HomeViewModel, which owns the map, the trip type and the polling loops that stand in for a push channel: trip and driver location every 10 seconds, trip chat every 5. Both apps keep access and refresh tokens in the Keychain.

Decisions

What we chose, and what we paid for it

Copy the shared core instead of packaging it

The rider app had working networking, auth and maps from the first day instead of an empty project.

What it cost

Leftovers from the driver app came along: old file headers, one reused endpoint path. A shared Swift package would have caught that. If a third app ever joins, the core becomes a package.

REST polling instead of a socket

One small backend, no socket server to build or run, and request-response traffic that is easy to debug.

What it cost

In December we were fixing exactly the kind of bug a push channel avoids: a stale cache let the polling loop exit early instead of refreshing.

One repository per domain

Each view model sees only the handful of calls it needs.

What it cost

Without a composition root, adding something like token refresh means touching every view model's initializer.

One big HomeViewModel

A change to trip state is a one-file edit, which helped a two-person team shipping fixes daily.

What it cost

It grew to about 1,800 lines and almost every fix touched it, which makes it hard for two people to work in parallel.

Hard parts

Where it pushed back

A polling loop that quietly stopped

The trip polling loop only fetched the current trip when its local cache was empty, and then read the trip type from that same cache. If the cache went stale, the loop exited instead of refreshing, and a rider's "waiting for driver" screen just stayed there. The fix was to always fetch the current trip and read its type live. It landed hours before that day's build.

The map fighting the user

Every marker update re-fitted the camera to all markers, so the map kept moving while someone was dragging a pin to set their pickup. Camera fitting is now switched off while the user is choosing a location.

A payment redirect landing on top of polling

The payment gateway returns to the app through a custom URL scheme, and that return has to land cleanly on whatever sheet the polling loop has already shown. It took more than one pass in the same week.

By the numbers

Where the two apps stand

~17K
Lines of Swift
187 files: 135 in the rider app, 52 in the driver app.
11
Onboarding steps
Phone, email, ID, address and vehicle before a driver can accept a ride.
Build 16
Rider app on TestFlight
Still before public launch.
Looking back

What I would tell myself at the start

  • Copying a codebase is fast, and it leaks. Without a package boundary, details from one app end up in the other.
  • Directing someone else's code is its own skill. Process helped less than making the right way the easy way in the code itself: one enum for endpoints, one pattern for repositories. That way the work stayed consistent even when I was not in the room.
  • Polling is a fine start for real-time state. But the December bugs were exactly what a push channel prevents, and that should be revisited before real trip volume arrives.