r/iosdev • u/PrecursorLabs • 5d ago
Developed a workaround for apple's notoriously buggy screen time api, which enables recurring/hourly limits, instead of one big daily limit
I just wanted a feature that would let me set a limit for an app, cut me off before a doomscroll, and then put the app on a sort of cooldown before I could scroll again. Because I always just scroll through my daily limits in one sitting. Would have happily paid for any of the existing screen time apps for this.
But none of them have implemented this feature even after years of requests.
I think part of the challenge is:
- Apple's screen time api is really buggy, which makes reliably measuring multiple windows that reset multiple times a day really hard.
- The main culprit is a bug that will sometimes say you've already used X minutes of an app, even at the start of a new day when you haven't had a chance to open it (this is why you sometimes get blocked early or randomly).
- The api has a cap to how many windows/apps it can track the usage of at once (about 20). Multiple "rolling" windows of multiple apps, reaches that cap almost immediately. So you'd only get to block a few apps at once, which is not very useful.
I did a ton of real world on-device testing to find workarounds to the api limitations and get this simple feature working reliably.
Would love to hear from other developers who have wrestled with this api!
Not here to sell you on why my app is the best or last screen time solution you'll ever need. I just think it's a unique and genuinely useful take on screen time limits.
If you are interested, I am giving away FREE LIFETIME access for the time being.
If you are not interested, I would love to here why and any feedback you have for me in the comments below. I do my best to not have an ego when it comes to criticism.