← Back
Project · In progress · 2026

transit-alarm

An iOS app that fires a system-level alarm — one that rings through Silent mode and Focus — as you approach your transit stop, so you can sleep through the commute.

The hard part isn't the map. It's that the subway kills GPS, a notification is not an alarm, and iOS suspends backgrounded apps aggressively. Four trigger layers run concurrently and the alarm fires when any one of them says you're close.

The four trigger layers

LayerMethodWorks when
T1
Hard time cap
Wall clock set at trip start.
Every sensor has failed.
T2
GPS proximity
Distance to destination.
Above ground with a fix.
T3
Stop counting
Accelerometer: decelerate → dwell → accelerate.
Underground where GPS is gone.
T4
Battery floor
Fires early once battery is below threshold.
The phone is dying mid-commute.

Status

Being upfront: the trigger engine is finished and tested; the iOS app that ships to a phone is not.

Trigger logicbuilt
A Swift package (Foundation-only) with the four trigger layers, a stop counter that reads accelerometer buckets, a coordinate helper, and a replay-driven LocationSource protocol. Builds and tests on a Mac today, without Xcode 26 and without a device — swift test passes.
GPX replay + tunnel fixturesbuilt
Two GPX fixtures ship with the package: bus_aboveground.gpx (8 stops, ~19 min, GPS throughout) and subway_blackout.gpx (~23 min, with a 12-minute GPS blackout starting 5 min in). The blackout reproduces the real trap — GPS looks like it's working until the moment it matters.
iOS app shellblocked
Blocked on toolchain. AlarmKit ships in the iOS 26 SDK, so it needs Xcode 26 (which needs macOS 26). Once that's in place: wire the trigger engine into an AlarmKit alarm, add a real CLLocationManager wrapper, ship an M1 gate build that has to wake me with the phone locked, silent, in a pocket.

Testing without riding a bus

The whole app sits behind a LocationSource protocol with two implementations: a RealLocationSource wrapping CLLocationManager, and a ReplayLocationSource that plays a GPX file at 1× / 10× / 60× and can black out for a set window to simulate a tunnel.

The Simulator can't prove this app works — it doesn't suspend apps like a real device, has no accelerometer, and won't tell you whether an alarm wakes a sleeping person in a coat pocket. Every milestone still ends with a physical-device check.

Verification per milestone

  1. M1 — the gate. 2-minute timer, phone locked, silent switch on, Focus enabled, in your pocket. Does it wake you? If not, nothing after this matters.
  2. M2 — GPS. 60× GPX replay, then one real walk around the block.
  3. M3 — underground. The blackout fixture, then one real bus ride.