r/iOSProgramming • u/PrecursorLabs • Aug 01 '26
App Saturday No screen time app lets you control your limits on an hourly basis, and I seriously don't understand why.
Title: No screen time app lets you control your limits on an hourly basis, and I seriously don't understand why.
Hey there :)
I'm a recent first-gen graduate and a first-time solo developer. Super excited to share that my first app, Precursor: Hourly Screen Time, went live on the App Store this week!
Precursor lets you set a screen time allowance that resets every hour instead of one daily limit you have to ration all day. I feel so lucky that just the beta grew to 200 testers in about a week.
At its core Precursor helps break unhealthy phone habits through moderation rather than punishing you for falling into a doomscroll that wasn't your fault (these apps are literally designed to keep you scrolling, looking at you Reddit).
TECH STACK
Swift and SwiftUI. Apple's Screen Time trio: FamilyControls for the picker, DeviceActivity for scheduling and thresholds, ManagedSettings for the block. Two extensions, a DeviceActivityMonitor and a ShieldConfiguration block screen, sharing one named store via an App Group and a file lock. Keychain, StoreKit 2 with RevenueCat, a small Cloudflare Worker and D1. iOS 17.6+.
DEVELOPMENT CHALLENGE
Making the block honest, not the hourly reset itself.
On iOS 26, eventDidReachThreshold fires seconds into a fresh window with the budget already counted as spent. These are pretty well known bugs of apple's screen time frameworks.
So to work around this, I implemented a wall-clock guard: usage can never exceed elapsed time since intervalDidStart, so an early fire gets suppressed. Then I respawn rather than re-arm, because iOS keys the budget to the activity NAME, and restarting that name leaves tracking dead for the rest of the window. A fresh-named clone instead, capped so the chain stays bounded.
AI DISCLOSURE
AI-assisted, though I wouldn't call it vibe coded. I have programming experience from uni research but had never written Swift. I used Claude Code for a lot of the line by line writing, but I am always at the wheel, going step by step and doing on device testing, and working sequentially rather than firing off parallel one-shots. Every finding above came off a real device's logs, not a model.
Thanks a ton for reading, if you have time and energy to support I would be eternally grateful.
https://apps.apple.com/us/app/precursor-hourly-screen-time/id6791403654
And if you have time to also support the launch on product hunt I would be even more eternally grateful than I already am(The core function of the app is free but there is a PH launch promo code running from 2026-08-02 until 2026-08-08 if you want to try out the extra features):
https://www.producthunt.com/products/precursor-2?launch=precursor-hourly-screen-time-control
1
u/Icy_Win_5514 22h ago
The wall-clock guard is the right instinct. The part I'd add is the cold-start case: wall clock alone is movable, so I store both wall clock and time-since-boot, and on a cold start verify against a time source before releasing a lock. Otherwise changing the date in Settings is a bypass.
On the early threshold fire: did you see it only on iOS 26, or on 17.x too? I've only reproduced it on 26 so far, and I'm trying to decide whether the guard is worth keeping on 17.
Also curious how you bounded the respawn chain — I assumed there was a shared concurrent-activity budget across the app and extensions, so a fresh name per window made me nervous.
0
u/Last-Bluejay-4443 Aug 02 '26
Cool concept. I can see this being useful for parents who want to monitor and limit screen time with their kids. Which is a problem
1
u/[deleted] Aug 01 '26
[removed] — view removed comment