Hello Apple Developer Community,
We're developing a parental control app using Apple's ScreenTime API and Family Sharing capabilities. We've encountered several persistent issues that are affecting our users' experience. We've found similar reports from other developers, suggesting these might be widespread problems. We're hoping to get some insight or solutions from the community or Apple experts.
Issues we're facing:
Parent apps visible on child's device:
After granting Family Sharing permission on the family picker, sometimes the parent's apps are visible instead of the child's apps.
Related issue: https://forums.developer.apple.com/forums/thread/749672
Inconsistent app visibility on family picker:*
The behaviour of the family picker is unpredictable:
Sometimes, no apps are visible at all, only categories.
Other times, categories are displayed and upon selection, enforcement works correctly.
In some instances, the stream delivering updates to the selection from the app extension doesn't send anything.
Related issue: https://forums.developer.apple.com/forums/thread/729198
Rules not enforced with different OS versions:
When the parent and child devices are running different iOS versions (both above iOS 16), ScreenTime rules don't seem to work correctly.
General inconsistencies:
We've observed various other inconsistencies in the behavior of the ScreenTime API. These issues are less predictable but contribute to an overall unreliable user experience.
Steps to Reproduce:
Add a child device using a parental control app (in our case, Adora for Kids).
Grant the Family Sharing permission.
Open the family picker to set up ScreenTime rules. Observe the inconsistent behaviour:
a. Sometimes no apps are visible.
b. Sometimes only categories are visible.
c. Sometimes both categories and apps are visible.
When categories are visible, select a category and attempt to enforce a rule.
Enforce a ScreenTime rule. Ensure the parent and child devices are running different iOS versions (both iOS 16+).
Test various ScreenTime rules and observe their enforcement across different device configurations.
Questions:
Are these known issues with the ScreenTime API?
What could be causing the inconsistent behavior in the family picker and the stream of updates from the app extension?
Are there any workarounds or best practices to mitigate these problems?
Is there any additional information we can provide to help investigate these issues?
Are there any plans to improve the stability and consistency of the ScreenTime API in future iOS releases?
We've tried researching these issues through various channels, including Apple's documentation and community forums, but haven't found definitive solutions. Any insights or assistance would be greatly appreciated.
Thank you for your time and help!
Environment:
Development: Xcode 15.4, macOS 14.2.1
Runtime: iOS 16+
App: Adora (App Store ID: 1671825554)
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
181 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Hello! I am developing an app using the Screen Time API. Everything is good, but I have a problem with DeviceActivityReport. On the child’s device, stats are synced to the app in about 1-5 minutes. However, on the parent’s device, it can take around an hour or more. How can I make the stats sync faster between the child’s device and the parent’s device?
How I Implemented It
@Published var context: DeviceActivityReport.Context = .init("Time Limit")
let filter = DeviceActivityFilter(
segment: .daily(
during: Calendar.current.dateInterval(of: .day, for: .now)!
),
users: .children,
devices: .all,
applications: applicationTokens
)
DeviceActivityReport(viewModel.context, filter: viewModel.filter)
.frame(maxHeight: viewModel.maxReportHeight)
In the Report Extension (Test Code)
for await d in data {
result += "device.name=\(d.device.name ?? "")"
result += "\nuser.appleID=\(d.user.appleID ?? "")"
result += "\ngivenName=\(d.user.nameComponents?.givenName ?? "")"
result += "\nrole=\(d.user.role.rawValue)"
for await activity in d.activitySegments {
result += "\nactivitySegments hashValue=\(activity.hashValue)"
result += "\ntotalActivityDuration=\(activity.totalActivityDuration)"
result += "\ndateInterval=\(activity.dateInterval)"
for await category in activity.categories {
result += "\ncategory=\(category.category.localizedDisplayName ?? "")"
for await app in category.applications {
result += "\napp=\(app.application.bundleIdentifier ?? ""), time=\(app.totalActivityDuration)"
}
}
}
}
Problems:
activity.categories can be empty for a long time
app.totalActivityDuration contains outdated information
I need to wait about 1+ hours to get “actual” information.
Family activity picker looses icon and incudes parent apps after 20 seconds...and you never see the kids icons again until you reboot. Any ideas?
family controls authorized on both apps
Share across devices activated
Web & activity activated.
Before...
...and after 22 seconds.
About 5 weeks ago, I requested a Family Controls Entitlement using this form:
https://developer.apple.com/contact/request/family-controls-distribution
I have yet to hear anything back. About a week ago, I submitted a support request through my Apple developer account, asking about the entitlement, and have also not heard anything back.
Is it normal to wait this long? Is there a way to check on the status of my request? Is there some other channel I should be using to ask for information about this process?
A few weeks ago, I submitted a request for the Family Controls & Personal Device Usage Entitlement to enable my app to access the Managed Settings and Device Activity frameworks in the Screen Time API. The app is nearly complete, with the only remaining component being the Family Controls capability.
As of now, I haven’t received a response regarding the request. I’m wondering if anyone else has experienced a similar situation or can provide insight into the following:
• How long does it typically take to receive feedback on this type of entitlement request?
• Is there a way to check if a request is still active and under review?
• Is a finished website required for the entitlement to be granted?
Any information or guidance would be greatly appreciated!
Tl:dr What are some reasons my bundleIDs aren't showing up and does anyone have good resources to setup the screentime API/DeviceActivityMonitorExtension?
I'm working on an iOS app that uses the FamilyControls and DeviceActivity frameworks to monitor and restrict app usage. The app allows users to select apps and set usage limits. When a limit is reached, a DeviceActivityMonitorExtension should block the selected apps.
My App setup: Have a model that is called when users select apps to manage these app bundle IDs are then serialized and sent to the Device Monitor Extension via App Group so it can be used when the event threshold is reached. Cant use Application Tokens because they are not serielizable and cant be passed to the extension.
Problem: While testing, I’m unable to retrieve the bundleIdentifier and localizedDisplayName from the Application objects after selecting apps. Instead, these properties are nil or empty, preventing me from saving the bundle IDs to share with the extension via App Groups.
Assumptions: I suspect this issue is due to missing the com.apple.developer.screentime.api entitlement, which might be required to access these properties even during development. I've requested for the entitlement but its still under review.
Key Code Snippets:
Authorization Request:
class ScreenTimeManager: ObservableObject {
static let shared = ScreenTimeManager()
@Published var isAuthorized: Bool = false
func requestAuthorization() async {
do {
try await AuthorizationCenter.shared.requestAuthorization(for: .individual)
DispatchQueue.main.async {
self.isAuthorized = AuthorizationCenter.shared.authorizationStatus == .approved
print("Authorization status: \(AuthorizationCenter.shared.authorizationStatus)")
}
} catch {
DispatchQueue.main.async {
print("Authorization failed: \(error.localizedDescription)")
self.isAuthorized = false
}
}
}
}
Accessing bundleIdentifier:
print("addAppGroup() Called")
let managedApps = selection.applications.compactMap { application -> ManagedApp? in
guard let token = application.token else {
print("No token for application: \(application)")
return nil
}
let app = Application(token: token)
print("New Application instance: \(app)")
guard let bundleID = app.bundleIdentifier, !bundleID.isEmpty else {
print("Bundle identifier is empty or nil for application: \(app)")
return nil
}
let displayName = app.localizedName ?? "Unknown App"
print("Processing application with bundleIdentifier: '\(bundleID)' and displayName: '\(displayName)'")
return ManagedApp(
bundleIdentifier: bundleID,
applicationToken: token,
localizedDisplayName: displayName
)
}
if managedApps.isEmpty {
print("No managed apps created. Exiting addAppGroup().")
return
}
// Continue with creating DeviceActivityEvent...
}
Logs - Shows application token but never bundleID or LocalizedDisplayname
Application(bundleIdentifer: nil, token: Optional(128 byte <TOKEN_PRESENT>), localizedDisplayName: nil)
What I've Tried:
Ensured Screen Time is enabled on the device.
Verified App Group configuration in both app and extension.
Checked that authorization is being requested and the status is .approved.
Cleaned and rebuilt the project.
Questions:
Is the com.apple.developer.screentime.api entitlement required to access bundleIdentifier and localizedDisplayName when using .individual authorization?
Is there a way to access these properties without the entitlement, or am I missing a configuration step?
Has anyone faced a similar issue and found a solution?
Lastly, is there a good place for additional resources on the screentime API??
I was granted permissions for family controls distribution for the main target of my app. Do I also need to request permission for the other targets like ShieldConfiguration, ShieldActionExtension, etc.? If no, how can i add the distribution capabilities to those targets?
I am developing an app that will utilize the Family Controls capability to use the DeviceActivity API. I understand that I need to request access to the Family Controls entitlement before releasing the app, but I am nowhere near that stage. I want to be able to test the Family Controls/Device Activity APIs while developing the app in debug mode, but I don't have the ability to add the Family Controls capability to my app. When I go to add it, it doesn't show up in the available options of capabilities to add.
Do I need authorization for the Family Controls entitlement to even use the APIs in testing/development? Am I missing a prerequisite checkbox somewhere that would add the capability to the available options?
I'm using XCode 16.0.
I’m developing a self-management app using Family Controls, but I’ve encountered a FamilyActivityPciker's crash due to an XPC(or UIRemoteView) issue when there are too many tokens(maybe 200+ items) in a category. This makes bad UX, so I’m looking for a workaround.
(I guess that the crash reason is cross process memory limitations, such as App Extension 50MB memory limitation.)
A lot of web domains contribute to increase the number of tokens, However, even after clearing Safari’s browsing history, the tokens displayed in the FamilyActivityPicker remains unchanged.
Is there any workaround that a 3rd party developer can implement to address this issue? prevent FamilyActivityPicker crashes or reduce the number of web domain tokens?
For example, if there’s a way to reset the web domain tokens shown in FamilyActivityPicker from the Settings app, I could offer a help to users.
Does anybody have ideas?
Expanding SNS Category (29 items)
It succeeded.
Expanding Productivity & Finance (214 items)
It failed. The screen froze, then appears blank. When the number of items is around 100, the crash rate is 50%, but when the items are over 200, the crash rate is 100%.
Search Bar Problem
The search bar also has same problem. If the number of search results are small, it works good without any blank, but if there are a lot of search results (200+), the XCP crashes and the screen appears blank.
Code to Reproduce
import SwiftUI
import FamilyControls
struct ContentView: View {
@State private var selection = FamilyActivitySelection()
@State private var isPickerPresented: Bool = false
var body: some View {
VStack {
Button("Open Picker") {
isPickerPresented = true
}
}
.familyActivityPicker(isPresented: $isPickerPresented, selection: $selection)
}
}
Steps to Reproduce
Prepare a category that has 200+ items
Try to open the category in the picker
The screen will freeze, then appears blank.
Errors in Console
[u EDD60B83-5D2A-5446-B2C7-57D47C937916:m (null)] [com.apple.FamilyControls.ActivityPickerExtension(1204)] Connection to plugin interrupted while in use.
AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:2164 (
0 AXRuntime 0x00000001d46c5f08 _AXGetPortFromCache + 796
1 AXRuntime 0x00000001d46ca23c AXUIElementPerformFencedActionWithValue + 700
2 UIKit 0x0000000256b75cec C01ACC79-A5BA-3017-91BD-A03759576BBF + 1527020
3 libdispatch.dylib 0x000000010546ca30 _dispatch_call_block_and_release + 32
4 libdispatch.dylib 0x000000010546e71c _dispatch_client_callout + 20
5 libdispatch.dylib 0x00000001054765e8 _dispatch_lane_serial_drain + 828
6 libdispatch.dylib 0x0000000105477360 _dispatch_lane_invoke + 408
7 libdispatch.dylib 0x00000001054845f0 _dispatch_root_queue_drain_deferred_wlh + 328
8 libdispatch.dylib 0x0000000105483c00 _dispatch_workloop_worker_thread + 580
9 libsystem_pthread.dylib 0x0000000224f77c7c _pthread_wqthread + 288
10 libsystem_pthread.dylib 0x0000000224f74488 start_wqthread + 8
)
Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
Hi everyone,
I’m developing an game with in-app purchases, designed for a a mixed audience(could be used by kids under 13). I understand that Apple’s Family Sharing has built-in consent mechanisms, like “Ask to Buy,” which helps manage purchases for kids. However, I’m unsure how to handle cases where Family Sharing is not set up or is disabled.
Key Concerns:
Kids Without Family Sharing: It’s possible for kids to have Apple IDs that are not part of Family Sharing, either because the feature is disabled, set up incorrectly, or the child is using an independent account due to an incorrect birthdate. This raises questions about whether relying solely on Apple’s built-in protections is sufficient.
Is It Enough to Rely on Apple’s Systems?: Apple’s systems do a great job of managing consent when Family Sharing is in place, but I’m concerned about compliance in cases where kids are not covered by these protections.
I want to ensure that my app remains compliant with COPPA and other relevant regulations, especially for users not covered by Family Sharing, without adding unnecessary layers for those who are correctly set up.
Looking forward to your insights and recommendations!
Thanks in advance!
Our app uses a 24-hour DeviceActivityMonitor repeating schedule to send users notifications for every hour of screen time they spend on their phone per day. Notifications are sent from eventDidReachThreshold callbacks at 1, 2, 3, etc, hour thresholds to keep them aware of their screen time.
We have recently received an influx of emails from our users that after updating to iOS 17.6.1 their DeviceActivityMonitor notifications are saying their screen time was much higher than what is shown in DeviceActivityReport and their device's Screen Time settings.
These users have disabled "Share Across Devices" - but I suspect the DeviceActivityMonitor is still getting screen time from their other devices even though that setting is turned off.
Has anybody else noticed this, understands what is causing this, or could recommend a fix that we can tell our users to do?
Hello,
I requested the Family Controls (Distribution) entitlement and was granted access:
However, the "Additional Capabilities" Tab is not showing up in the associated App ID in "Certificates, Identifiers & Profiles":
Thank you in advance,
FCG
I've submitted several requests for Family Controls Distribution access for all of my app targets over two weeks ago and have not gotten any response. The app I've been working on for over a year is finally ready to beta test to 200+ waitlisted users but this final roadblock is killing me! Anyone know what to do? Is there anyone else I could reach out to other than the apple request form to get help with this? Thank you!
I want to create an app to control a child's device. As I understand it, I need to follow this logic:
I have one app for both the child and the parent.
For the child, I request authorization with the following code:
try await AuthorizationCenter.shared.requestAuthorization(for: .child)
For the parent, I show functions like:
familyActivityPicker
Are these settings automatically applied to the child's device, or do I need to send a silent push notification to apply the new settings? Additionally, how can I get statistics from the child's device to the parent's device?
I am working on a screen time app that helps individuals shield distracting apps and web content.
Assuming one is granted the Family Controls entitlement and a user accepts the Family Controls authorization request, can you call the ManagedSettings framework from your main app? Is this framework only allowed to be used within the context of a Device Activity Monitor Extension?
I'm unsure if this type of usage will result in an instant rejection from App Review?
Hi everyone,
I’m developing a parental control app using Apple's ScreenTime API, and I need to display ScreenTime data separately for each child in a family. The API offers options like .children and .all, but I’m looking for the best way to reliably filter and show data for a single child within the app.
I’ve seen other apps like Ohana successfully implement this feature, even the apple official family screen time feature has this where parents can view ScreenTime data for each child individually. I want to achieve a similar experience in my app, ensuring that if a parent selects "John," the app only displays John's ScreenTime, without mixing in data from his siblings.
Here’s the approach I’m considering using DeviceActivityFilter and DeviceActivityReport to target data for a specific child:
let filter = DeviceActivityFilter(
segment: .children,
intervals: .everyDay
)
let report = DeviceActivityReport(
filter: filter
) { (data) in
// Process and separate data for each child
if let activityData = data as? DeviceActivityReportData {
for child in activityData.children {
if child.name == "ChildName" { // Replace "ChildName" with the actual child's name or identifier
// Access and display data for the specific child
print("Child: \(child.name), Screen Time: \(child.screenTime)")
}
}
}
}
Context:
Goal: I need to ensure parents can view ScreenTime data for each child individually, similar to how Ohana does it. For example, selecting "John" should display only John's ScreenTime.
Challenge: While some data can be grouped within the DeviceActivity extension, I'm not entirely sure if this approach with DeviceActivityFilter is the most reliable way to isolate and display data for a single child.
Has anyone implemented a similar solution? Are there any alternative methods or best practices that could improve the accuracy and reliability of this filtering?
Any advice or examples would be greatly appreciated!
Thanks!
Hello! I've been doing a lot of work with ApplicationTokens, but there is very little documentation. While Apple gives you the FamilyAcitvitiesPicker to get tokens of apps on an iPhone, I need to get the tokens of apps that aren't on the phone.
Example:
Someone can select Instagram even though they don't have it downloaded. Then the application token will get sent to a server. Then a different person who does have Instagram on their phone will receive the token and it will do something with that application.
Because FamilyActivitiesPicker can only select apps on the iPhone that it is running on, FamilyActivitiesPicker is useless to me, leading to my problem:
Creating an ApplicationToken without FamilyActivitiesPicker
This documentation says that I can create an Application (and thus an ApplicationToken) from the bundle identifier
init(bundleIdentifier: String)
Creates an object that represents the app with the specified bundle
identifier.
However, when I try to use this to get instagrams(or any apps) token, it returns nil every time!
So, finally, my questions:
How do I correctly use this initializer to create an ApplicationToken?
Or, if this won't work for my purposes
Are the ApplicationTokens created by FamilyActivitiesPicker the same across all devices no matter what?
Hello. I’m building an app that would use the Screen Time API to restrict apps on the users phone at set times and also give Device usage reports and analysis to the user. Do I need to request permission from apple to do this? If no, then what applications of the API require getting permission from Apple?
I've been using DeviceActivityMonitor for 2 years, and recently noticed the following issue, starting in iOS 17.5 (another user also reported here).
For a sizable percentage of my users, device activity event thresholds get triggered together. My app sends notifications for every hour of screen time during the DeviceActivitySchedule using event thresholds. Often users will get, for example, the 1, 2, and 3 hour screen time notifications all at the same time.
I have a hypothesis for why this is happening: the system sometimes terminates the app extension for various reasons, one being if the 6MB memory limit is reached. It seems as though the retry policy is to retry the failed threshold at the next event threshold. And if the following threshold also fails, they can pile up until the next one succeeds. I think this is a new retry policy since iOS 17, and I believe this because:
There used to be a bug where the same threshold was triggered multiple times in a row, indicating that the failed threshold was retried immediately. This bug is no longer around and it's been replaced by the one I am reporting.
According to my logs, thresholds that get triggered together are also called earlier when they are supposed to be called - but the callback function does not complete. So this indicates that the threshold isn't just called late, but that it is called once and then retried again later.
If anyone could answer the following questions I'd be super grateful:
Is there ANY way to log when the system terminates the app extension and for what reason? And not just on my own device, but for all our users in production (because it's hard to reproduce this issue, as it only happens for some portion of our users). Maybe some kind of crash report or failure callback that will allow my to ping my server?
Could anyone at Apple could confirm my hypothesis about the new retry policy causing this issue?
I've been working a lot with the FamilyControls API and App Shield recently but have encountered a problem with no documentation. I used the FamilyActivitySelection to select the app store to shield(This is just for testing), and then printed out the application token:
1wfY¸êB ò S« öi #×(É?âðw ù/jQ ¿ J ïE¢? ·¿ º<Òd?ý r7¥Ãn N átJ¹ÿ85B_{VAF fC8. ,,¸¯3 T7F ±õü; ¹?v@¯ô Ä \-õ# Ò
I know the application token is a Codable object so I was wondering,
How do I create an application token using the Token<Application> initializer
init(from: any Decoder) throws
Creates a new instance by decoding from the given decoder.
Using the above data? Do I have to encode first in order to decode it?
For reference, the code I tried to use is:
newValue.applicationTokens.encode(to: JSONEncoder)
if let encoded = try? JSONEncoder().encode(newValue.applicationTokens) {
data = encoded
print(String(data: data, encoding: .utf8)!)
}
if let app = try? JSONDecoder().decode(Token<Application>.self, from: data) {
let token = Application(token: app)
print(token)
} else {
print("didn't work")
}
But it prints didn't work every time.
What should I do differently?