Build parental control and digital wellbeing features on iOS using FamilyControls, ManagedSettings, and DeviceActivity. Covers authorization, app selection with FamilyActivityPicker, shield enforcement, and usage monitoring.
Ships in all-ios-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Build parental control, focus, and digital wellbeing features on iOS and iPadOS using FamilyControls, ManagedSettings, and DeviceActivity.
FamilyControls requires the Family Controls Entitlement (com.apple.developer.family-controls). Request authorization via AuthorizationCenter.shared before presenting pickers or configuring stores.
import FamilyControls
@MainActor
final class ScreenTimeAuthManager {
static let shared = ScreenTimeAuthManager()
func requestAuthorization(for memberType: FamilyControlsMember = .individual) async throws {
// Options: .individual (user's own device) or .child (parental device managing child)
try await AuthorizationCenter.shared.requestAuthorization(for: memberType)
}
var authorizationStatus: AuthorizationStatus {
AuthorizationCenter.shared.authorizationStatus
}
}
Allow users to select apps, categories, or web domains using SwiftUI's familyActivityPicker. Store the opaque FamilyActivitySelection securely in UserDefaults via an App Group container.
import SwiftUI
import FamilyControls
struct AppRestrictionPickerView: View {
@State private var selection = FamilyActivitySelection()
@State private var isPickerPresented = false
var body: some View {
Button("Select Apps to Shield") {
isPickerPresented = true
}
.familyActivityPicker(
isPresented: $isPickerPresented,
selection: $selection
)
.onChange(of: selection) { _, newSelection in
saveSelection(newSelection)
}
}
private func saveSelection(_ selection: FamilyActivitySelection) {
guard let groupDefaults = UserDefaults(suiteName: "group.com.example.app.screentime") else { return }
if let encoded = try? PropertyListEncoder().encode(selection) {
groupDefaults.set(encoded, forKey: "ShieldedSelection")
}
}
}
Use ManagedSettingsStore to apply app shields, block application installs, restrict web domains, or enforce safari filter policies.
import ManagedSettings
import FamilyControls
@MainActor
final class ShieldManager {
static let shared = ShieldManager()
private let store = ManagedSettingsStore(named: .init("FocusShield"))
func applyShield(to selection: FamilyActivitySelection) {
// Shield specific applications
store.shield.applications = selection.applicationTokens.isEmpty ? nil : selection.applicationTokens
// Shield categories with optional exclusions
store.shield.applicationCategories = selection.categoryTokens.isEmpty ? nil : .specific(selection.categoryTokens)
// Shield web domains
store.shield.webDomains = selection.webDomainTokens.isEmpty ? nil : selection.webDomainTokens
}
func clearShield() {
store.clearAllSettings()
}
}
Schedule background monitoring thresholds with DeviceActivitySchedule and DeviceActivityCenter. Time limit events invoke the separate DeviceActivityMonitor extension target.
import DeviceActivity
final class DeviceScheduleManager {
static let shared = DeviceScheduleManager()
private let center = DeviceActivityCenter()
func startSchedule() throws {
let schedule = DeviceActivitySchedule(
intervalStart: DateComponents(hour: 9, minute: 0),
intervalEnd: DateComponents(hour: 17, minute: 0),
repeats: true,
warningTime: DateComponents(minute: 5)
)
let activityName = DeviceActivityName("WorkHoursSchedule")
try center.startMonitoring(activityName, during: schedule)
}
func stopSchedule() {
center.stopMonitoring([DeviceActivityName("WorkHoursSchedule")])
}
}
AuthorizationCenter.requestAuthorization without approval and provisioning profile entitlement fails immediately.ApplicationToken and WebDomainToken are deliberately opaque tokens for user privacy; apps cannot read bundle identifiers or URLs from them.DeviceActivityMonitor runs in a separate extension process triggered by the system daemon; do not expect the main app to receive delegate calls directly.clearAllSettings() or explicitly resetting properties.UserDefaults(suiteName:) to share serialized FamilyActivitySelection.com.apple.developer.family-controls entitlement been declared and provisioned?AuthorizationCenter.shared.requestAuthorization() invoked before opening the picker or modifying settings?FamilyActivitySelection instances serialized with PropertyListEncoder / PropertyListDecoder into an App Group suite?ManagedSettingsStore rather than private APIs?clearAllSettings() provided to allow users to release shields?DeviceActivityMonitor extension handle intervalDidStart, intervalDidEnd, and eventDidReachThreshold?What SKILL.md sets; muted values are Claude Code's defaults
95 skills in this plugin
/accessorysetupkitDiscover and configure Bluetooth and Wi-Fi accessories using AccessorySetupKit. Use when presenting a privacy-preserving accessory picker, defining discovery descriptors for BLE or Wi-Fi devices, handling accessory session events, migrating from CoreBluetooth permission-based scanning, or setting up accessories without requiring broad Bluetooth permissions./activitykitBuild or review Live Activities and Dynamic Island experiences with ActivityKit, including lifecycle, layouts, push updates, and scheduled delivery. Use for time-sensitive Lock Screen or Dynamic Island state; route ordinary widgets to widgetkit./adattributionkitMeasure ad effectiveness with privacy-preserving attribution using AdAttributionKit. Use when registering ad impressions, handling attribution postbacks, updating conversion values, implementing re-engagement attribution, configuring publisher or advertiser apps, or replacing SKAdNetwork with AdAttributionKit for ad measurement./alarmkitBuilds AlarmKit alarms and countdowns with system Lock Screen, Dynamic Island, StandBy, and Apple Watch presentation. Use for authorization, AlarmManager scheduling, stop/secondary actions, countdown extension handoff, state observation, or Live Activity-backed alarm experiences./app-clipsBuilds App Clips and their invocation, routing, App Store Connect experiences, size/capability limits, promotion, data handoff, notifications, and full-app migration. Use for App Clip Codes, URLs, NFC/QR, Safari/Maps/Messages invocation, NSUserActivity, or App Group/keychain transfer./app-intentsImplement App Intents for Siri, Shortcuts, Spotlight, widgets, Control Center, and Apple Intelligence on iOS. Covers AppIntent actions, AppEntity and EntityQuery models, AppShortcutsProvider phrases, IndexedEntity Spotlight indexing, WidgetConfigurationIntent, SnippetIntent, and assistant schemas. Use when exposing app actions or entities to system surfaces./all-ios-skills:family-controlsfrom all-ios-skills
npx claudepluginhub thienqo/ios-skills --plugin all-ios-skillsOther plugins' skills for the same job