Hi there!
I've been getting this error when I've checked multiple times that I've included the right entitlements as well as provisiong profile. My one concern is that perhaps I'm unable to submit to internal or external TestFlight with Family Controls (Development) and need the one for distrubution, but have yet to submit my appplication for this ability. If anyone has any inisght into this issue lmk!
Family Controls
RSS for tagPrevent access to the Screen Time API without guardian approval and provide opaque tokens that represent apps and websites.
Posts under Family Controls tag
194 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi, I have a released screentime app ScreenZen. The last few days I've seen a disturbing spike in bug reports coming from people with 17.4.1 and 17.5.1 phones with no update to the app itself. People reported they saw the issue immediately after updating their iOS version. Unfortunately it is not replicable on all phones with those versions, so we haven't been able to replicate it on our test phones.
It appears the issue is the ApplicationToken passed into ShieldActionExtension and ShieldConfigurationExtension does not match any of the ApplicationTokens that the user selected to block through FamilyControls. (The selected ApplicationTokens are being loaded through a group UserDefaults and they are indeed being loaded in the ShieldActionExtension in the bug reports).This is preventing the app from loading the correct settings and handling the blocking accordingly. I am trying to isolate this better with a new release with better logging, but would appreciate any help on this issue.
We persist ApplicationTokens in a storage container that ShieldConfigurationExtension has access to. In rare, cases all the ApplicationTokens for a user seem to change.
We know this because the Application parameter passed into configuration(shielding application: Application) -> ShieldConfiguration function has a Token that does not match (using == ) any of the ones we are persisting in storage.
Interestingly, the persisted ones still work, so I don't believe storage has gotten corrupted or anything. We can use them to add or remove shields, we can use them to display labels of the apps they represent, etc. But they don’t match what’s passed into the ShieldConfiguration extension. If the user goes into the FamilyPicker at this point and selects an app of a token that we are already persisting, the FamilyPickerSelection will have a token matching the new one that is passed into ShieldConfigurationExtension, not the one we persisted when they last selected that app.
This leads me to believe the tokens are updated/rotated in some cases. When and why does this happen, and how can we handle it gracefully?
I’m in crisis mode and desperately need advice. Launching in 10 days and just hit a major roadblock.
Background:
Set up developer account under a business name only because we needed the D-U-N-S number when starting development
Have a working app with Family Controls already configured on the main identifier
Yesterday my developer discovered we need Family Controls on 3 additional identifiers for launch
a week ago (terrible timing) I submitted a business name change request thinking it was good housekeeping
The Crisis:
Certificates, Identifiers & Profiles portal is completely locked during business name change processing
Can’t add Family Controls to the 3 identifiers we need for launch
Business name change typically takes 2-4 weeks
Launch is in 10 days
What I’ve Done:
Contacted Apple Developer Support explaining the urgency
Case ID: 102633553000 for the name change request
Desperate Questions:
Has ANYONE successfully cancelled a business name change mid-process for urgent app needs?
Any emergency escalation paths at Apple for launch-blocking issues?
Would creating a new developer account be faster? (Though that seems nuclear)
Any other workarounds I’m not thinking of?
The business name change was purely administrative - nothing structural changes. But these identifier updates are absolutely critical for launch functionality and we didn’t realize they were needed until trying to launch into testflight.
This is our first time so learning a lot the hard way 🫠.
Thanks in advance for any help!
Topic:
Developer Tools & Services
SubTopic:
Apple Developer Program
Tags:
Entitlements
Family Controls
Hello,
I already have got approval from Apple for com.apple.developer.family-controls entitlement
When I am building my app, there is one part where I need to check the list of applications which I have blocked with my app.
To get the list I have to have com.apple.developer.managed-settings entitlement ...
Now how and where show I get hold of it ?
I already got permission for Family Control, how do I get hold of this now ?
I have tried multiple time through multiple channels and you have yet to respond to my request.
I am developing an App on xcode
APP Bundle ID: garymdmd.MediaPace
Apple ID: 6740823496
Apple has granted me distribution use of the Family Control/Screentime module for my main app.
According to your engineer's post here:
https://developer.apple.com/forums/thread/764919
That permission should be extended to your extensions that are part of the app.
When you try to setup the extension identifiers they do not show the "added capabilities" column that sow sup when getting permission for the main app so you are not able to endow the extension with these permissions which seem to be needed to work with the app.
I am trying to add these bundle identifier extensions:
garymdmd.MediaPace.ScreenTimeMonitorDuo
garymdmd.MediaPace.DeviceActivityReport
Can you please tell me how to get this to work or to add permissions to these extensions. I have sent in the request form multiple times (here - https://developer.apple.com/contact/request/family-controls-distribution) and Apple simply writes back that I have permission after a few weeks but nothing changes for the extension capabilities.
I have developed three apps using the Screen Time API. The following are common problems I encountered in the three apps:
DeviceActivityMonitorExtension is automatically killed after running for a few days (frequently)
The same DeviceActivityEvent in DeviceActivityMonitorExtension is triggered twice during eventDidReachThreshold (especially obvious in iOS18.5)
Screen Time authorization is automatically canceled for no reason (occasionally)
I hope to get help
How to programmatically check if ApplicationToken or ActivityCategoryToken is expired in FamilyActivityPicker?
I'm building a Screen Time-based parental control app using FamilyControls and ManagedSettings. We use FamilyActivityPicker to allow the user to select apps and categories to restrict, and we apply the shield using:
store.shield.applications = .specific(selection.applicationTokens)
store.shield.applicationCategories = .specific(selection.categoryTokens)
Sometimes, we observe that the shield silently fails to apply — no error is thrown, but the restrictions aren't enforced. I suspect this may be due to expired or invalid tokens, possibly if the app was removed or the selection became stale.
My Questions:
Can ApplicationToken or ActivityCategoryToken expire or become invalid over time?
If yes, is there a supported or recommended way to detect whether a token is still valid before applying it to the shield?
Is comparing the current shield values (store.shield.applications and store.shield.applicationCategories) after applying them a reliable validation method?
What's the best practice to handle expired tokens (e.g. re-prompt the FamilyActivityPicker, or show a fallback)?
What Is the Expiration Duration of Tokens from FamilyActivityPicker?
Any guidance or insight from the Screen Time/FamilyControls team would be greatly appreciated!
Thank you!
I’m creating an app with the Screen Time API and I would like to know how to make the app show a parental control editing view for parents and a view for child accounts that shows which apps are blocked. How can I do this?
Is there any way to use the screen time API on Mac?
Hello,
I am thinking of developing a parental control app but I do not know if I need to request the api for using "Time Screen API". In positive case, where it should be?
Is there anyway to use this for educational centers? Not just for families?
Kind regards.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
Tags:
Frameworks
App Store Connect API
Family Controls
I created a ShieldConfigurationExtension in Xcode 14.3 with File > New > Target > ShieldConfigurationExtension. This created the extension with all the necessary Info.plist values (correct NSExtensionPrincipalClass, etc.), with the extension included in embedded content in the host app target.
No matter what I try, the extension is not getting invoked when I shield applications from my host app. The custom UI does not show as the shield, and looking at the debugger, an extension process is never invoked.
I am shielding categories like this:
let managedSettings = ManagedSettingsStore()
...
managedSettings.shield.applicationCategories = .all()
And my extension code overrides all the ShieldConfigurationDataSource functions.
class ShieldConfigurationExtension: ShieldConfigurationDataSource {
override func configuration(shielding application: Application) -> ShieldConfiguration {
return ShieldConfiguration(
backgroundBlurStyle: UIBlurEffect.Style.systemThickMaterial,
backgroundColor: UIColor.white,
icon: UIImage(systemName: "stopwatch"),
title: ShieldConfiguration.Label(text: "You are in a Present Session", color: .yellow)
)
}
override func configuration(shielding application: Application, in category: ActivityCategory) -> ShieldConfiguration {
return ShieldConfiguration(
backgroundBlurStyle: UIBlurEffect.Style.systemThickMaterial,
backgroundColor: UIColor.white,
icon: UIImage(systemName: "stopwatch"),
title: ShieldConfiguration.Label(text: "You are in a Present Session", color: .yellow)
)
}
override func configuration(shielding webDomain: WebDomain) -> ShieldConfiguration {
return ShieldConfiguration(
backgroundBlurStyle: UIBlurEffect.Style.systemThickMaterial,
backgroundColor: UIColor.white,
icon: UIImage(systemName: "stopwatch"),
title: ShieldConfiguration.Label(text: "You are in a Present Session", color: .yellow)
)
}
override func configuration(shielding webDomain: WebDomain, in category: ActivityCategory) -> ShieldConfiguration {
return ShieldConfiguration(
backgroundBlurStyle: UIBlurEffect.Style.systemThickMaterial,
backgroundColor: UIColor.white,
icon: UIImage(systemName: "stopwatch"),
title: ShieldConfiguration.Label(text: "You are in a Present Session", color: .yellow)
)
}
}
What am I missing?
Topic:
App & System Services
SubTopic:
General
Tags:
Extensions
Managed Settings
Family Controls
Device Activity
I use DeviceActivityCenter to monitor app usage.
For DeviceActivityEvent, I set 30 events, and the threshold of each event increases by 2 minutes:
var events: [DeviceActivityEvent.Name: DeviceActivityEvent] = [:]
for index in 0..<30 {
let threshold = (index == 29)
? DateComponents(hour: 1)
: DateComponents(minute: (index + 1) * 2)
let name = DeviceActivityEvent.Name("\(prefix)|\(index)")
events[name] = DeviceActivityEvent(applications: tokens, threshold: threshold)
}
After reaching the last DeviceActivityEvent, I will restart directly in DeviceActivityMonitor
private func restartMonitoring(activity: DeviceActivityName) {
let center = DeviceActivityCenter()
let currentEvents = center.events(for: activity)
do {
try center.startMonitoring(activity, during: schedule, events: currentEvents)
} catch {
print("Fail: \(error)")
}
}
But I found that after restarting, DeviceActivityEvent will be automatically executed even if I don't use the app.
My iOS version is 18.5
Hi,
I am developing a Screen Time App and I am having issues with the ShieldConfigurationExtension (ShieldConfigurationDataSource). I know this extensions is sandboxed but I should be able to read data from the main app.
I am using SwiftData as my database, but I am unable to initialize it in the extensions with an error indicating insufficient file permissions. I have App Group set up and I am able to share data using UserDefaults but that is just inconvenient.
Is there any way I could just open the SwiftData in read only mode so that I could display the user some info on the shield?
SwiftData Init:
private func setupContainer() throws {
let schema = Schema([
DogEntity.self,
HouseEntity.self
])
// Use app group container if available
let config: ModelConfiguration
if let containerURL = FileManager.default.containerURL(
forSecurityApplicationGroupIdentifier: "group.\(Bundle.app.bundleIdentifier ?? "")"
) {
config = ModelConfiguration(schema: schema, url: containerURL.appendingPathComponent("default.sqlite"))
} else {
config = ModelConfiguration(schema: schema)
}
self.container = try ModelContainer(for: schema, configurations: [config])
}
Error in extension:
fault: Attempt to add read-only file at path file:///private/var/mobile/Containers/Shared/AppGroup/51431199-5919-4AE6-940C-6FE3C53EEB46/default.sqlite read/write. Adding it read-only instead. This will be a hard error in the future; you must specify the NSReadOnlyPersistentStoreOption.
error: (3) access permission denied
error: Encountered exception error during prepareSQL for SQL string 'SELECT TBL_NAME FROM SQLITE_MASTER WHERE TBL_NAME = 'Z_METADATA'' : access permission denied with userInfo {
NSFilePath = "/private/var/mobile/Containers/Shared/AppGroup/51431199-5919-4AE6-940C-6FE3C53EEB46/default.sqlite";
NSSQLiteErrorDomain = 3;
} while checking table name from store: <NSSQLiteConnection: 0x154100300>
error: Store failed to load. <NSPersistentStoreDescription: 0x15402d590> (type: SQLite, url: file:///private/var/mobile/Containers/Shared/AppGroup/51431199-5919-4AE6-940C-6FE3C53EEB46/default.sqlite) with error = Error Domain=NSCocoaErrorDomain Code=256 "The file “default.sqlite” couldn’t be opened." UserInfo={NSFilePath=/private/var/mobile/Containers/Shared/AppGroup/51431199-5919-4AE6-940C-6FE3C53EEB46/default.sqlite, NSSQLiteErrorDomain=3} with userInfo {
NSFilePath = "/private/var/mobile/Containers/Shared/AppGroup/51431199-5919-4AE6-940C-6FE3C53EEB46/default.sqlite";
NSSQLiteErrorDomain = 3;
}
Any help appreciated 🙂
Topic:
App & System Services
SubTopic:
General
Tags:
Family Controls
Managed Settings
Screen Time
SwiftData
I have filled the form to request for this access, but it has been 15 days now and I haven’t gotten any feedback. Apple Support said the appropriate team will be in contact with me once it has been approved. It’s been 15 days and still nothing. I just want to know how long it would take, and Apple’s WWDC 2025 is around the corner, I was really looking forward to get this done before then.
Topic:
Developer Tools & Services
SubTopic:
Apple Developer Program
Tags:
Developer Tools
Entitlements
Family Controls
Certain entitlements require special permission from Apple like DriverKit or Screentime API/Family controls.
Those entitlements are tied to the bundle IDs of the app.
If those entitlements have been granted for an app from developer A (personal account) and we transfer that app to developer B (organization account), including the bundle IDs, will those bundle IDs keep the entitlement?
Or will we need to re-request from the developer account B?
Any insights or experiences regarding this process would be greatly appreciated.
Topic:
Developer Tools & Services
SubTopic:
Apple Developer Program
Tags:
DriverKit
Family Controls
Screen Time
Entitlements
I'm using FamilyActivityPicker to get consent for app/category management, which returns a FamilyActivitySelection object.
I serialize this FamilyActivitySelection object (just applicationTokens and categoryTokens) and pass it to my DeviceActivityMonitor extension via App Group UserDefaults. I am using the JSON encoder/decoder over PropertyList (though both seem to exhibit the same behavior).
After inspecting the FamilyActivitySelection object immediately after it's returned by FamilyActivityPicker in the main app, the application.bundleIdentifier property is consistently nil for every Application object within selection.applications. Similarly, category.localizedDisplayName is nil for ActivityCategory objects. This happens whether "Select All Apps" is used or if apps/categories are selected individually.
I understand that this is the intended behavior due to Apple's user privacy policies. I read on another post that my app can be provided with bundle identifiers and app names within Shield Configuration extensions and Device Activity Report extensions - I'm not sure which ones or how exactly to do this.
I am aware that I can use Label(applicationToken) SwiftUI view to display the app name/icon, but this doesn't give programmatic access to the bundleIdentifier string.
My app will not log or export these bundleIdentifiers outside of its sandbox. My goal is to create mappings to the FamilyActivitySelection with the publicly accessible bundleIdentifiers.
Any guidance, examples, or clarification on the intended workflow for this scenario would be greatly appreciated!
Hi everyone,
I'm following up on this post I made earlier about an issue I'm having with FamilyControls and the DeviceActivityMonitor extension not working for external TestFlight testers.
To briefly recap:
I have official Apple approval for the com.apple.developer.family-controls entitlement (distribution)
The entitlement is added to both my main app and the DeviceActivityMonitor extension
The App Group is correctly configured for both targets
On internal TestFlight builds, everything works as expected: app blocking works, the extension runs, and selected apps are shielded.
On external TestFlight builds, users get the Screen Time permission prompt, can select apps to block, but nothing is blocked.
Since that post, I submitted a Code Level Support request, and Apple asked me to file a bug report via Feedback Assistant. I did that almost a month ago.
The only reply I’ve received since is that they can’t give a timeframe or guarantee it will be resolved. I'm stuck in limbo with no updates and no fix.
This feature is critical to my app and I cannot launch without it. I’ve reached out to other developers who use app blocking, and none of them have run into this issue. My setup seems correct, and Apple has not said otherwise.
If anyone has experienced something similar, found a workaround, or knows how to get real movement on a bug report like this, I would really appreciate any help. It’s been weeks, and I just want to launch my app.
Thanks so much.
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags:
TestFlight
Family Controls
Device Activity
I’m requesting access to the Family Controls API for an iOS app currently in development. I’ve submitted the request through the official form here:
https://developer.apple.com/contact/request/family-controls-distribution
However, after submitting, I receive no confirmation email or support ticket ID. The page only shows a “Thank you for requesting the API” message, and I’m left without a way to track or confirm the request.
This entitlement is essential for my app’s functionality, and I need to move forward with development and testing. Can someone from the Apple team please confirm receipt of the request and provide guidance on the next steps or estimated timelines?
Hello,
In a new app I am working on I noticed the FamilyActivityTitleView that displays "ApplicationToken" has wrong (black) color when phone is set to light mode but app is using dark mode via override.
We display user's selected apps and the labels are rendered correctly at first, but then when user updates selection with FamilyActivityPicker, then those newly added apps are rendered with black titles.
The problem goes away when I close the screen and open it again. It also doesn't happen when phone is set to dark theme.
I am currently noticing the issue on iOS 18.4.1.
I have tried various workarounds like forcing white text in the custom label style, forcing re-render with custom .id value but nothing helped.
Is there any way how to fix this?