◉RORK LABJP
●SUBDOMAIN — Rork can now connect your web app to a subdomain only, leaving your root domain and www untouched (12/1)●UPDATES — expo-updates 58.0.23 fixes Android release builds embedding a stale runtime version●FLASH END — Intro pricing for Gemini Flash models ends 12/31, 29 days from now. Time to recheck AI feature costs●HMR — Some report the dev server picking up another server's bundle and then exiting●FIRST VIEW — Map the first screen for a normal launch, a notification, and a link, and back navigation stops surprising you●CARBON — Gemini 4 Carbon and Argon are now at standard rates: $4.00 input, $20.00 output per 1M tokens●SUBDOMAIN — Rork can now connect your web app to a subdomain only, leaving your root domain and www untouched (12/1)●UPDATES — expo-updates 58.0.23 fixes Android release builds embedding a stale runtime version●FLASH END — Intro pricing for Gemini Flash models ends 12/31, 29 days from now. Time to recheck AI feature costs●HMR — Some report the dev server picking up another server's bundle and then exiting●FIRST VIEW — Map the first screen for a normal launch, a notification, and a link, and back navigation stops surprising you●CARBON — Gemini 4 Carbon and Argon are now at standard rates: $4.00 input, $20.00 output per 1M tokens
Articles/Dev Tools
⬡ Dev Tools/2026-04-28Advanced

Implementing Screen Time Control Apps with Rork Max — Family Controls / DeviceActivity / ManagedSettings

A complete walkthrough for shipping a Screen Time-style app with Rork Max — covering Family Controls authorization, DeviceActivity scheduling, and ManagedSettings shielding via custom native modules and a DeviceActivityMonitor extension.

Rork Max236ScreenTime APIFamily ControlsDeviceActivityManagedSettingsiOS Development13Native Modules5

✦ Premium Article

Close a few social apps at 10 p.m. — it sounds like a one-line spec. Then you start building, and the first wall isn't the UI or the logic. It's a capability Apple hands out by review, and a separate process that runs without your main app.

Family Controls, DeviceActivity and ManagedSettings all hinge on the Family Controls entitlement, and when the schedule fires, your main app is not guaranteed to be running. Start from the JS side without knowing that and you will redo work.

What follows is the smallest "night shield" for an Expo-based Rork project, from entitlement request to review submission. It assumes some custom-native-module experience, but each step is laid out in order.

What I'd put first is this line: JS handles authorization, launching the picker and registering the schedule — the extension does the actual blocking.

I'd draw that line on paper before opening Swift; swapping the order may be where most of the rework comes from.

Why Rork Defaults Cannot Ship a Screen Time App

Out of the box, Rork Max bundles the standard Expo SDK modules: camera, notifications, location, secure storage, and so on. None of the three Screen Time frameworks ride on that train. Specifically:

  • The FamilyControls framework refuses to even compile without the com.apple.developer.family-controls entitlement on your provisioning profile
  • The DeviceActivity framework's "fire a callback when this time window starts" mechanism is delivered as an App Extension target — not in your main app — because the OS calls it when your app is not running
  • ManagedSettings, which actually applies the shield, depends on shared state between the main app and the extension via an App Group container

For a typical "swipe through screens" app, Rork's Vibe Coding loop covers 95% of what you need. Screen Time work, however, crosses three boundaries at once: OS-level permissions, extension targets, and shared data. Trying to fake any of these layers is the fastest way to lose a weekend. The pragmatic move is to set up the right architecture from day one — Rork main app, Swift native module, Extension target, App Group — and never look back.

Architecture: The Three Frameworks at a Glance

Before we start writing code, let's pin down what each framework actually does. Confusing them is the most common source of "why won't this work" sessions later.

  • FamilyControls is the consent and selection layer. It owns the prompt that asks the user to grant Screen Time access, and it owns FamilyActivityPicker, the SwiftUI component that lets the user pick which apps and categories to govern. The user's choice comes back as a FamilyActivitySelection — a privacy-preserving opaque token, not a list of bundle IDs
  • DeviceActivity is the scheduling layer. It says "when this time window opens, wake up an extension" or "when this app has been used for 30 minutes today, notify me." The extension runs even when your main app is terminated
  • ManagedSettings is the enforcement layer. Hand a FamilyActivitySelection to a ManagedSettingsStore, and the OS immediately blocks those apps with a system shield UI

So the architecture is a three-stage rocket: pick targets (FamilyControls) → register schedule (DeviceActivity) → block on cue (ManagedSettings).

How This Maps to a Rork Project

This is the layout used throughout the article:

  • Main app (Rork Max build): React Native UI, calls into Swift via the custom Expo module
  • Native Module (Swift): bridges authorization requests, picker presentation, schedule registration, and shield management to JS
  • DeviceActivityMonitor Extension (Swift): a separate target. The OS wakes it up at schedule boundaries; it pulls the saved selection from shared storage and applies the shield
  • App Group: group.{your-bundle-id}.shield added to both targets, used as the single source of truth for the user's blocklist via UserDefaults(suiteName:)
✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦Anyone stuck on why Rork Max alone cannot ship a Screen Time app will walk away with a working three-framework integration — Family Controls, DeviceActivity, ManagedSettings — embedded as a custom Expo module.
✦You'll have Swift modules for FamilyActivityPicker presentation, DeviceActivityCenter scheduling, and a dedicated DeviceActivityMonitor extension with App Group data sharing — including the per-extension entitlement requests that are easy to miss.
✦You'll know how to dodge the five most common shipping pitfalls (FamilyActivitySelection privacy boundaries, App Group misnaming, jetsam crashes in extensions, child-mode simulator failures, App Review rejections) and submit a build with the right review notes.
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⬡ Dev Tools2026-07-18
The Generated Screen That Quietly Jams at AX5 and in German — Putting Layout Resilience Checks on Rork Max SwiftUI
A record of running every Rork Max generated SwiftUI screen through pseudolocalization and the largest text size to find exactly where it jams. Covers when to reach for ViewThatFits, ScaledMetric and layoutPriority, plus the snapshot checks that catch regressions every time you regenerate.
⬡ Dev Tools2026-05-17
Reading Rork Max's SwiftUI Generation Through a Wallpaper App's Requirements — What to Trust, What to Fix, What to Write by Hand
Typical wallpaper-app requirements — grid, pinch-zoom, slideshow, photo-library permission, ads, in-app purchase — handed to Rork Max's SwiftUI generation: where the output tends to hold up and where it tends to break. For the memory failure that bites first, this note includes decode-time downsampling, a bounded cache, and a procedure for measuring on your own device.
⬡ Dev Tools2026-05-16
Migrating Firebase CocoaPods to SPM in Rork Max Apps
Since Firebase 13.0.0 (October 7, 2026) the Apple SDK ships only through Swift Package Manager and binaries, and CocoaPods trunk stops accepting podspecs on December 2. A migration log from moving Rork Max iOS apps to SPM, with a symptom-by-symptom troubleshooting table, the dSYM and Dropbox pitfalls, and what to check before moving to Firebase 13.