An iOS accountability app: lock the apps that distract you, and let your friends decide when you get them back.
You pick the apps that eat your time and form a pact with friends. Once you're locked in, opening a blocked app shows a shield screen. To unlock it you send a request, and a friend from your pact has to approve it in real time.
- App blocking with Apple's Screen Time APIs (FamilyControls, ManagedSettings, DeviceActivity).
- Pacts: create a group, invite friends with a code and hold each other accountable.
- Unlock requests that friends approve or decline, delivered live through Supabase Realtime and push notifications.
- Custom shield screen shown instead of the blocked app, with an action to request an unlock.
- Sign in with Apple and per-user profiles.
┌──────────────────────────── iOS app (SwiftUI) ─────────────────────────────┐
│ LockIn app ShieldConfiguration ShieldAction DeviceActivity │
│ (pacts, requests) extension (UI) extension Monitor ext. │
│ └───────────── shared App Group + Shared/ code ────────────┘ │
└──────────────────────────────────┬──────────────────────────────────────────┘
│ Supabase Swift SDK (auth, REST, realtime)
┌──────────────────────────────────▼──────────────────────────────────────────┐
│ Supabase: PostgreSQL with row-level security, Realtime, Edge Functions │
│ functions/request-response approve or decline an unlock request │
│ functions/push-notification APNs push to pact members │
└──────────────────────────────────────────────────────────────────────────────┘
The app ships as four targets generated with XcodeGen (project.yml): the main app plus three Screen Time extensions that share code and state through an App Group.
| Path | What's inside |
|---|---|
LockIn/ |
Main SwiftUI app: views, models, services |
Shared/ |
Code compiled into the app and all extensions |
ShieldConfiguration/, ShieldAction/, DeviceActivityMonitor/ |
Screen Time extensions |
supabase/migrations/ |
Database schema and RLS policies |
supabase/functions/ |
Edge Functions (TypeScript) |
- Install XcodeGen and run
xcodegenin the repo root. - Copy
Secrets.xcconfig.exampletoSecrets.xcconfigand fill in your Supabase URL and anon key. - Set your development team and open the generated Xcode project.
- Run on a real device (Screen Time APIs don't work in the simulator).
Full backend setup (Supabase project, migrations, Sign in with Apple, push notifications) is in SETUP.md, and the target and schema reference is in INFRA.md.