Case Study — Trotty
A native iOS + watchOS app that tracks dog walks in real time and encrypts every GPS point on-device. Swift/SwiftUI · CryptoKit · watchOS · Cloudflare Workers.
At a glance
Dog owners want a simple way to track walks — distance, route, bathroom and sniff markers — across their phone and watch. But a walk route is a continuous record of where you live and go every single day. Most tracking apps ship that to a server in plaintext. I wanted live tracking without handing over a map of someone's daily life.
Architecture, native iOS + watchOS development, on-device cryptography, the GPS tracking engine, and the auth backend.
Built the tracking engine on CoreLocation with GPS smoothing, dwell detection, and sniff/altitude markers, rendering live routes on MapKit; persistence and the data model run on SwiftData.
Encrypted every location point on-device with CryptoKit (AES-GCM), generating and storing keys in the Keychain — the server never sees a plaintext track. Wrote dedicated tests for the crypto engine and track-point encryption.
Built a watchOS companion that records walks independently and syncs to the phone over WatchConnectivity, plus Live Activities (ActivityKit) and Home Screen widgets (WidgetKit) for at-a-glance walk status.
Backed Sign in with Apple with a stateless Cloudflare Worker that mints short-lived ES256-signed JWTs from the team's .p8 key to call Apple's token and revoke endpoints — no database, no logging, no persisted state.
A V1 in development spanning iPhone, Apple Watch, widgets, and Live Activities — with end-to-end on-device encryption of all location data and a zero-state auth backend. The architecture keeps the most sensitive data (where you walk every day) on the device by default.
Building native across iPhone and Watch forces you to design for sync and failure from the start — the two devices drift, lose connection, and disagree, and the data model has to survive that. And doing encryption properly is mostly key management: the cipher is the easy part; deciding where keys live, how they're recovered, and what the server is allowed to know is the real design work.