Screen Time

RSS for tag

Share and manage web-usage data, and observe changes made to Screen Time settings by a parent or guardian.

Posts under Screen Time tag

158 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

How to get all ManagedSettingStore objects
Using the Screen Time API, I can create multiple ManagedSettingStore objects with different names. Is there a way to retrieve these later by name? For example, if I create them dynamically from a configuration managed by the user of my app, and the app crashes or its data gets corrupted, how can I get rid of "stale" ManagedSettingStore objects that I no longer know? Or, if I somehow lose the name of a ManagedSettingStore I created, how long does the store stay active? Forever? How can I get rid of the "stale" store?
0
1
37
2d
Screen Time Crash Bug & Downtime Features Taken Away
I have recently noticed that ever since I downloaded iOS 18 Public Beta 1, I have been unable to get to the screen time settings, after clicking the tab, the app just freezes. Although after a while I did get to the Screen Time tab, but all of the previous changes to my screen time were voided. App limits, Downtime, you name it, all gone. While my app limits do not work, I noticed that downtime still functioned, but when my parent changed the downtime settings on their phone (running iOS 17 no betas), it did nothing on my end. I am currently submitting feedback to apple and am trying to find workarounds. On an unrelated note to this issue, I noticed that “One More Minute” and “Request More Time” aren‘t there anymore, does anybody have any ideas or workarounds on any of these?
0
1
57
2d
Inconsistency in the DeviceActivityEvent callbacks
We are using the Apple ScreenTime API for monitoring the usage of device. As mentioned in the documentation (https://developer.apple.com/documentation/familycontrols), we are getting the family controls authorisation from the user. We also have added the ‘DeviceActivityMonitor’ app extension (https://developer.apple.com/documentation/deviceactivity/deviceactivitymonitor) to receive the schedule and event callbacks. We have a requirement in which we have to notify the user for every 15 minutes usage of the device in the specified interval. He can optionally select individual categories or applications for the 15 minutes notification. For monitoring the usage for individual categories or applications, we obtain the token by presenting the FamilyActivityPicker as discussed in this documentation https://developer.apple.com/documentation/familycontrols/familyactivitypicker. For simplicity in testing during the development phase, we reduced the 15 minutes to 2 minutes. The events callbacks are expected to be delivered as soon as the threshold is reached but there are some inconsistencies with the event threshold callbacks. Sometimes the event callbacks are deferred and delivered together, sometimes the event callbacks are not delivered at all, sometimes a few event callbacks are missed etc.
1
1
266
3d
iOS 18 screen time crashing bug
i just downloaded the iOS 18 beta yesterday and now my phones (iPhone 15 pro) screen time keeps crashing. when I reach my limit and input the screen time code it won’t respond and keeps me locked out. when I went into the settings to just turn off screen time the entire settings app just freezes and then crashes entirely. I’ve tried restarting the phone several times and nothing has any impact and can’t find anything online except a lot of other people having the same issue without a fix.
1
2
159
4d
ScreenTimeAPI Access
"Hi everyone! We've encountered an issue with uploading our app to the App Store. We received the Family Controls Distribution permission, updated the certificates and profiles, submitted it for review, but received feedback that the request simply doesn't appear for the moderators. Does anyone know what the problem might be? Our request is: try await center.requestAuthorization(for: .individual). We also confirmed that the device must have TouchID or FaceID installed."
0
0
135
6d
Calling requestAuthorization() for a child account throws "restricted"?
I'm developing an iOS app that uses ScreenTime API. Locally, everything works as expected - I have two physical devices in one Apple Family, and calling AuthorizationCenter.shared.requestAuthorization(for: .child) on a child device shows standard authorization dialog. Currently the app is in a review by Apple, and they are saying they can't authorize as a child. From logs, and a screenshots provided by them, I see that on AuthorizationCenter.shared.requestAuthorization(for: .child) call, FamilyControlsError.restricted error is being thrown. I didn't encounter this error once during development and can't simulate this issue now either. Tried everything - authorization on account that is not a child, not in a family, tried restricting everything possible for a child's device from ScreenTime settings. This specific error is never triggered. Does anyone have idea why this error could happen? My last guess is the review team is using an enterprise account and that somehow intercepts with ScreenTime settings. But I don't have an enterprise account to test this theory.
4
1
502
1w
Will special entitlements like Screentime API remain valid when transferring an app?
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.
0
0
144
1w
Usage time tracking is being killed by jetsam
Brief & History Since iOS 17.4 and up we experience a lot of flakyness when it comes to DeviceActivity event thresholds. After a lot of testing and investigations inside system logs and filing countless bug reports we found a reproducible way why the event thresholds are not getting properly called. Findings Apparently when the device reaches near to max memory something called jetsamkills processes left and right. This means that the UsageTrackingAgent that (we think) is responsible for tracking the usage time of the device gets killed and doesn't recover until significant memory is freeing up on the device. How to test it yourself Use a slightly older device with ~ 3 or 4 GB of RAM Open a game or two that is meomry intensive (like Fishing Clash, yes..) and observe In the console logs you see something that only happens then: Process UsageTrackingAgent [39307] killed by jetsam reason highwater This happens often but recovers itself when the UsageTrackingAgent exceeds their 6MB memory limit. Yet the log looks like this: Process UsageTrackingAgent [39307] killed by jetsam reason per-process limit Once you kick the game, the memory is free and sometimes the event thresholds are calling in again. Defeating the purpose However this defeats the purpose of tracking usage time and shielding perhaps the playing app from being played after a certain amount of time! Feedback Assistant Ticket Here is the ticket with sysdiagnose, step by step and more information: FB13884981 Please fix this ASAP, this is such a pain for production users and their kids EVERY DAY.
1
6
446
1w
Using blockedApplications in the Screen Time API
What is the proper use case of blockedApplications in the Screen Time API? I seem to be using it exactly as the documentation describes, however it is being rejected from the App Store. I am passing in bundle identifiers to block/hide the applications from the device. What would be the proper way to use blockedApplications? Or is there a way to use it at all in an app being submitted for review? Thanks!
1
0
180
1w
Ios 18 beta time limit not working properly
i’ve recently updated to ios 18. I previously had a time limits set for instagram on my phone , so if i am past my time limit i could just ignore the time limit and continue using the app, but after upgrading to ios 18, i simply cannot use the app after the 1 hour limit set by me. Sometimes it would open, but without sound. I have tried all the things like turning off downtime ,turning off app and webtime activity , adding the app to always allowed list and so on. still no better. I use an 11 pro max.
21
11
1.5k
2w
The DeviceActivityMonitor did not trigger a callback
The listening callbacks were not triggered for intervalDidStart and intervalDidEnd after successfully starting center.startMonitoring when I attempted to set a schedule with DeviceActivitySchedule at 20-minute intervals Is there anyone who can assist me? Thank you. Below you will find my code. let intervalLengthInSeconds = 20 * 60 let intervalEnd = Date(timeIntervalSinceNow: TimeInterval(intervalLengthInSeconds)) let intervalStart = Date() let schedule = DeviceActivitySchedule(intervalStart: Calendar.current.dateComponents([.hour, .minute], from: intervalStart), intervalEnd: Calendar.current.dateComponents([.hour, .minute], from: intervalEnd), repeats: false, warningTime: DateComponents(minute: 1)) let newActivity = DeviceActivityName(rawValue: "20minuteUse") Log("😯 \(String(describing: schedule.nextInterval))") do { try center.startMonitoring(newActivity, during: schedule) } catch { print("failed to start session: \(error.localizedDescription)") } class MyMonitorExtension: DeviceActivityMonitor { let store = ManagedSettingsStore() // You can use the `store` property to shield apps when an interval starts, ends, or meets a threshold. override func intervalDidStart(for activity: DeviceActivityName) { super.intervalDidStart(for: activity) // Shield selected applications. Log("😓 start-------") } override func intervalDidEnd(for activity: DeviceActivityName) { super.intervalDidEnd(for: activity) Log("😓 end-------") } override func intervalWillStartWarning(for activity: DeviceActivityName) { super.intervalWillStartWarning(for: activity) Log("😓 StartWarning-------") } override func intervalWillEndWarning(for activity: DeviceActivityName) { super.intervalWillEndWarning(for: activity) Log("😓 EndWarning-------") } } schedule.nextInterval ------ print: 😯 Optional(2024-06-21 08:34:00 +0000 to 2024-06-21 08:54:00 +0000)
2
0
216
2w
Screen Time | How to enable/disable screen time for a game app by setting start and end times?
try center.startMonitoring(.daily, during: schedule) let schedule = DeviceActivitySchedule( intervalStart: DateComponents(calendar: Calendar.current ,hour: 20, minute: 0), intervalEnd: DateComponents(calendar: Calendar.current ,hour: 22, minute: 59), repeats: true, warningTime: nil ) extension DeviceActivityName { static let daily = Self("daily") }
1
0
157
2w