Menu

1 / 2

Six things Apple's Screen Time API won't do, from building an iPhone app blocker

DEV Community: ios·Warden·1 day ago
#N9gH7u7l
#devtoios#devto#dev#warden#shield
Long article (920 words) — no AI summary yet.
Reading 0:00
15s threshold

We build Warden, an iPhone app blocker. You can optionally make a friend the person who approves early unlocks. Everything it does runs on Apple's Screen Time frameworks: FamilyControls for permission and the app picker, ManagedSettings for the shields, and DeviceActivity for schedules and usage thresholds.

The frameworks are good at blocking. They are also strict about what an app is allowed to know, and most of our design decisions came from working around that. These are the limits we hit, and what we did about each one.

1. You never learn which apps the user picked

FamilyActivityPicker returns opaque tokens: ApplicationToken , ActivityCategoryToken and WebDomainToken . You can store them, hand them to ManagedSettings to shield those apps, and render them with Apple's Label(token) view, which draws the icon and name for you. Your code never sees a bundle ID or an app name.

That's a privacy feature, and we've come to like it.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.