← all work

RepGate

An iOS app that gates distracting apps behind movement - chosen apps stay shielded until you earn time with push-ups, squats or a plank, counted on-device by the camera. One rep buys one minute.

Type
Personal Project · Native iOS / On-Device ML
Year
2026
Role
Sole developer - a native iOS app with a separate, fully tested logic package.

Re-locks reliably through three independent mechanisms reading one shared expiry, and keeps a UI-free logic package with 62 tests that runs without a simulator.

  • On-device pose detection, no network
  • Three independent re-lock mechanisms
  • 62 logic tests + 37 app tests, CI

The problem

Distracting apps eat the day and screen-time limits are trivial to dismiss - I wanted a blocker you actually have to earn your way past with real movement.

Shield selected apps behind exercise, count reps on-device with the camera, and re-lock reliably once the earned time runs out.

What I did

  1. Split all logic into a pure-Swift RepGateKit package - rep counting, time ledger, blocking state - testable without a simulator (62 tests).
  2. Used Vision's DetectHumanBodyPoseRequest for on-device pose detection, with angle and posture checks as anti-cheat so a rep only counts when it's real.
  3. Wired Screen Time / DeviceActivity / Family Controls for shielding and StoreKit 2 for the paywall, with GitHub Actions CI and swift-format linting.

Outcome

A working app with strict Swift 6 concurrency, 62 kit tests plus 37 app tests, and CI on every push.

Stack

  • Swift 6
  • SwiftUI
  • Vision
  • DeviceActivity / Family Controls
  • StoreKit 2
  • XcodeGen
Next caseObsidian × Claude

© Johan Stefanesback home

Get in touch
Still building this site