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!
Screen Time
RSS for tagShare and manage web-usage data, and observe changes made to Screen Time settings by a parent or guardian.
Posts under Screen Time tag
163 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
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??
Made a screen time password a little while ago and recently updated to ios 18. Went to turn it off and couldn’t remember the password. There was not forgot password option and now I’m on my like millionth attempt to guess the password.
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 working on a Swift application and trying to determine whether an application has exceeded its limit based on an ApplicationToken. I have the following function to check if the current app's token matches any of the tokens stored when the app limit is reached:
private func isAppLimitExceeded(for application: Application?) -> Bool {
guard let application = application, let appToken = application.token else { return false }
let exceededTokens = configManager.getAppLimitExceededTokens()
return exceededTokens.contains { exceededToken in
appToken == exceededToken
}
}
The function configManager.getAppLimitExceededTokens() returns a list of [ApplicationToken] that were saved in UserDefaults when an app limit is reached. The goal is to use the isAppLimitExceeded method to verify if the current shield for the app is triggered due to a limit/threshold being exceeded.
This function is part of a class that conforms to the ShieldConfigurationDataSource protocol:
class ShieldConfigurationExtension: ShieldConfigurationDataSource {
// ...
}
My concern is whether comparing two ApplicationToken instances using == is a reliable method for determining if they are equal.
Are ApplicationToken objects guaranteed to be comparable with == out of the box, or do I need to implement Equatable or another method of comparison?
Could there be issues with tokens stored in UserDefaults not matching due to reference or serialization differences?
Any guidance on how to ensure proper comparison of these tokens would be appreciated!
Thanks!
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?
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?
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?
My app correctly applies the ShieldConfiguration template that I chose (icon, text, CTA, etc), but some users reported seeing the following default shield:
With the default shield text that reads, "You cannot use AppName because it is restricted."
Any idea why?
Hi everyone,
I’m encountering an issue with shield.applicationCategories = .all(except: applications.applicationTokens) when trying to shield all apps except a specified few. Despite using this configuration, all apps are getting shielded, including those that should be exempt.
I’ve verified that the correct applicationTokens are being used and ensured that there are no conflicting schedules that might override this configuration. Interestingly, the ShieldConfiguration appears for the apps that are supposed to be blocked, but not for the ones in the exception list.
Has anyone else experienced this issue, or does anyone have insights into what might be causing this behavior?
Thanks in advance!
Quibr question for Apple -
Context: We are developing an app that via screentime access blocks restricted sites for gamblers. However our blocking can be bypassed by going into settings→screentime->Apps With Screen time access" and toggling off access to screentime with device’s FaceID (and not the screentime passcode.) Then they can browse whatever blocked site and delete our app if they wish.
Question: We would like to know if there is a way to get the information when and how many times the toggle of our app under the “Apps with screen time access” has been pressed, or its current status.
3rd waay:
Alternatively is there a way to monitor if the app is still installed on the device?
Hey everyone,
I'm working on implementing an AppLimit, where after accumulating x minutes of Screen Time for an app, it should be blocked. It works fine on the first day, but stops functioning correctly on subsequent days.
What I'm Doing
I start a 24/7 schedule with a DeviceActivityEvent that has a specified Screen Time threshold.
In my DeviceActivityMonitor, I'm reacting to the eventDidReachThreshold. Once the accumulated time is reached, the app is blocked. This works as expected on the first day.
Issues I'm Experiencing / Questions
Second Day Issue: On the second day, the app is no longer blocked after the Screen Time threshold is reached, even though it worked on the first day. This leads me to suspect that a DeviceActivityEvent is "consumable". Is this correct?
Pre-existing Screen Time Issue: If a user has already surpassed the Screen Time threshold before monitoring starts, the app isn't blocked once the schedule is set up. This leads to 2 issues:
I would expect that the accumulated amount of time after starting the schedule would result in the call of eventDidReachThreshold. But it is never called
It could also be the case that the previously accumulated time is being kept in mind, but that would mean the apps should be blocked, which isn't the case.
Does the threshold account for accumulated Screen Time before the schedule begins? I haven't tested setting a limit of 10 minutes, accumulating 3 minutes of Screen Time, then starting the schedule and accumulating the remaining time, but I'm curious if anyone has encountered this behavior.
Does anyone have an explanation for this behavior? Any help would be greatly appreciated!
Hi everyone,
I'm trying to find out if there's a way to mock Screen Time for a specific app (either on a real device or in a simulator). Specifically, I need to set the usage time of an app to something like 15 minutes. I'm not looking to alter the total Screen Time, just the usage time for a single app.
Currently, I'm manually keeping the app open for 15 minutes before I can start testing to see if the desired behavior occurs, but this process is slow and frustrating. Unfortunately, I can't reduce the 15-minute threshold, as Apple doesn't allow it for this particular use case.
Any advice or solutions would be greatly appreciated!
Hello Apple Developer Community,
We have developed two totally separate apps for parental control: one for parents (xyz/parent.com) and one for children (abc/child.com). These are not two sides of the same app, but rather distinct applications. Recently, we integrated these two apps and encountered a few challenges and questions that we hope the community can help with.
Family Picker Behavior: We noticed that only the parent app on the current device is displayed in the Family Activity Picker. Is this the intended behavior? Our expectation was that the Family Activity Picker would show both the parent and child apps available on the device. Is there a way to ensure that both types of apps are listed?
Filtering Apps in Family Picker: Is it possible to filter the apps displayed in the Family Activity Picker to show only the child’s app and exclude the parent app? Our goal is to streamline the selection process for users by removing irrelevant apps from the picker. If direct filtering is not possible, are there any recommended workarounds or best practices to achieve a similar result?
Screen Time Permission Requirements: We’ve successfully implemented screen time permissions using the Authorization Center for the child app. However, do we also need to request screen time permissions from within the parent app? If so, are there any specific guidelines or best practices for managing screen time permissions across two interconnected apps?
Triggering Child Managed Settings from Multiple Apps: Is it feasible to trigger managed settings (e.g., enabling restrictions) for the child app from both the parent and child apps? We want to ensure consistent enforcement of settings regardless of which app initiates the change. Are there any limitations or conflicts we should be aware of when managing settings from two different apps?
We appreciate any guidance or insights you can provide on these issues. We’ve referred to the Family Controls and Screen Time documentation, but we're seeking more specific advice related to the integration of two separate apps in this context.
Thank you in advance for your help!
Hi everyone,
I'm currently working with the Screen Time API, specifically trying to figure out the best way to pause an active, repeating schedule without disrupting future schedules. Here's the scenario:
I have a repeating schedule set from 10:00 AM to 8:00 PM daily. If I need to pause the schedule temporarily, my current approach involves stopping monitoring, clearing all restrictions, and then setting a new schedule for the remaining time after the pause. However, this method cancels the repeating schedule entirely, which causes issues when the schedule is supposed to restart the next day at 10:00 AM. Instead, it starts after the pause time, which isn’t what I want.
Challenges I'm Facing:
Maintaining Repeating Schedules:
How can I pause the schedule in a way that ensures it resumes correctly the next day at the intended time (10:00 AM)?
DeviceActivityMonitor Logic:
Is there a way to deactivate and reactivate the schedule through the DeviceActivityMonitor without fully stopping the monitoring? Ideally, I'd like to retain the original schedule, pause it, and then resume it seamlessly after the pause.
What I’ve Tried So Far:
I’ve attempted to store the necessary data in the App Groups shared container as a local file. In the DeviceActivityMonitor, I used the schedule's name to identify and retrieve the saved object, planning to use this data to reapply the shielding after the pause. Unfortunately, this approach exceeds the 6MB memory limit of the extension, which is another roadblock.
Given these issues, I’m unsure how to move forward. Are there any best practices or alternative approaches that could help manage this situation more effectively? Any insights or suggestions would be greatly appreciated!
Thanks in advance for your help.
Hello! I'm currently making an app that requires the ability to activate a screenlock for a point in the future. I currently have my project setup so that I can set a screenlock through a DeviceActivityMonitorExtension (DAM) but regardless of the time interval I use for intervalDidStart and intervalDidEnd the screenlock just seems to apply instantly. I'm under the impression that I'm missing something outside of just passing the interval to the DAM functions. Has anyone accomplished this? Thank you!