Screen Time

RSS for tag

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

Screen Time Documentation

Posts under Screen Time tag

161 Posts
Sort by:
Post not yet marked as solved
4 Replies
2.2k Views
Hello, The purpose of "Screen Time Passcode" under Settings/Screen Time is to protect Screen Time preferences and it is asked every time the user updates Downtime, App Limits, Content & Privacy Restrictions and so on. But the private passcode is not requested if the user disables Screen Time for a particular app (only Face ID or phone passcode is requested, but not the private Screen Time passcode). I think this is a mistake, I think the purpose of a private Screen Time passcode is to protect all settings, including apps that use this API, right? Is there any solution to this? Thank you.
Posted
by
Post marked as solved
4 Replies
2.5k Views
Hi folks! Please help me to clarify some things related to Screen Time API. What the keys differences between individual and child authorization? With individual type of auth user can do sign-out from iCloud and delete the app. What else differentiate this type of users? Can we use DeviceActivityEvent for remote control with individual auth? Can the parental or guardian see/get the statistic of apps usage? Is the individual auth available to all users or just those who are in the Apple's family? I'll really appreciate any help and answer! Thank you in advance!
Post marked as solved
3 Replies
2.7k Views
Hi all! I'm thankful to Kmart for his answers related to Screen Time API features iOS 15 / iOS 16. That really helpful! Please, help me to clarify a few more things... As I read here in the comment ManagedSettings has two type of restrictions, shielding and blocking. Is blocking type of restriction available for users with individual type of auth? If the answer on the first question is "No", does that mean that individual user will be able just to skip the shielding screen and continue to use apps? If individual user can skip shielding, will it be allowed to do it with a passcode or without, if the passcode wasn't set for Screen Time in the phone settings? I'll really appreciate any help and answer! Thank you in advance!
Post not yet marked as solved
3 Replies
1.1k Views
Hello! I believe there is a bug: ShieldConfigurationDataSource extension does not update when the app to be blocked is already open and the ManagedSettingsStore.shield.applications is set to the app that is already open. The shield comes up but has a stale ShieldConfiguration not reflecting the current state of the app is used. I've been able to replicate the issue in an independent app "OffScreen". If you start a blocking time range from 10:00-10:15, it will say "No Twitter until 10:15" and then open Twitter at 10:15. If there is another blocking time range from 10:16-10:31, the app will be open until 10:16 when the shield will reactivate and it will still say "No Twitter until 10:15" when is should say "No Twitter until 10:31". thanks!
Posted
by
Post not yet marked as solved
6 Replies
2.1k Views
When I tap on one of the buttons in the ShieldAction extension I want to close the shield and open the parent app instead of the shielded app. Is there any way of doing this using the Screen Time API? class ShieldActionExtension: ShieldActionDelegate {      override func handle(action: ShieldAction, for application: ApplicationToken, completionHandler: @escaping (ShieldActionResponse) -> Void) {     // Handle the action as needed.           let store = ManagedSettingsStore()               switch action {     case .primaryButtonPressed:       //TODO - open parent app       completionHandler(.defer)     case .secondaryButtonPressed:       //remove shield       store.shield.applications?.remove(application)       completionHandler(.defer)         @unknown default:       fatalError()     }   }   }
Posted
by
Post not yet marked as solved
3 Replies
1.5k Views
I've implemented shielding apps with new Screentime API. But I don't know how to shield all categories app except the app selected by user in the FamilyActivityPicker? Here is my code to shield apps and it worked. But I want to know if I could shield all apps and all "categories" except the apps user selected. I want to allow only the apps and categories that user has selected. let store = ManagedSettingsStore() if let object = UserDefaults.standard.object(forKey: "SelectedAppTokens") as? Data { let decoder = JSONDecoder() if let appTokens = try? decoder.decode(Set<ApplicationToken>.self, from: object) { store.shield.applicationCategories = ShieldSettings.ActivityCategoryPolicy.all(except: appTokens) } } I save 'applicationTokens' from FamilyActivityPicker and shield with it.
Posted
by
Post not yet marked as solved
2 Replies
832 Views
I am using the DeviceActivity framework to let the user track their activity (so also for non FamilySharing users). For tracking to cover multiple devices, does the app need to be installed/running on all devices or can the OS report activity to the app on one device? I haven't found a way to do that...
Posted
by
cmj
Post marked as solved
2 Replies
1.1k Views
There is frequently a delay of a few seconds before a DeviceActivityReport renders its view generated from the DeviceActivityReportExtension. It will also sometimes flash with zero data before hydrating with the real activity data (tested with extension code taken directly from XCode boilerplate) Is there a way to be notified when the DeviceActivityReport renders successfully or is still processing, i.e. so a loading indicator can be presented while the extension runs? Thanks!
Posted
by
Post not yet marked as solved
3 Replies
1.1k Views
Hello, we have rare case of AuthorizationCenter.shared.requestAuthorization(for: .individual) failing to autorize user on real device - iPhone XR (iOS 16.1.2). It does not throw the standard FamilyControlsError which we are handling, but NSCocoaErrorDomain. This is the entire po description: Error Domain=NSCocoaErrorDomain Code=4864 "The given data was not a valid property list." UserInfo={NSCodingPath=(), NSDebugDescription=The given data was not a valid property list., NSUnderlyingError=0x283af4d80 {Error Domain=NSCocoaErrorDomain Code=3840 "Cannot parse a NULL or zero-length data" UserInfo={NSDebugDescription=Cannot parse a NULL or zero-length data}}} The localized one says: "The data couldn’t be read because it isn’t in the correct format." This sounds like some error deep in iOS. The testing device has Apple ID logged in and uses passcode. Anything we can do on our end to solve this issue?
Posted
by
Post not yet marked as solved
3 Replies
1.2k Views
Good afternoon. I have a question, the answer to which I did not find in the documentation. Let's imagine that there is a parent device and two or more children (each child device received authorization "AuthorizationCenter.shared.requestAuthorization(for: .child)"), an application is installed on each of the devices. All accounts (parent and child) are members of the same Family group. How can I show the familyActivityPicker on the parent device and display information there separately for each of the children's devices. As I see it, familyActivityPicker shows either applications from one of the children's devices or all applications from all children's devices, which seems very inconvenient to me. If you call familyActivityPicker on the application directly on the child's device, then the applications that correspond to this device are shown. If you watch the native Screen Time application on the parent device, there is a choice of children's devices. Thank you!
Posted
by
Post not yet marked as solved
4 Replies
2.0k Views
I am trying to build an app that blocks access to other apps (Like screentime) through react native. I know that IOS has ScreenTime API which has device activity which has the feather to do that. Is it possible to integrate this into a react native app? I've been looking online but can't find much information or documentation regarding this, but I failed to find much.
Posted
by
Post not yet marked as solved
1 Replies
1.2k Views
I am building a screen time restricting app that shields certain apps. I would like to know when users attempt to "cheat" by adding an app to the "Always Allowed" list in the Screen Time Settings. Having a way to detect when the user takes this action would be helpful. I've explored other options but they all seem to fall short: If I set store.shield.applications, that will also shield "Always Allowed" apps, but unfortunately, this is restricted to 50 apps. This would be ideal, if not for the 50 apps limit. If I set a store.shield.applicationCategories policy, this will not shield the "Always Allowed" apps. Using a DeviceActivityMonitor.eventDidReachThreshold callback, but this is triggered regardless of whether or not the shield is visible. Ideally, it would only be triggered for unshielded apps. Trying to indicate the shield is visible from the ShieldConfigurationDataSource, but this extension is sandboxed for privacy reasons so I cannot communicate back to the hosting app. Is what I'm requesting possible? Thanks
Posted
by
Post not yet marked as solved
2 Replies
714 Views
currently when I try to set several schedules to the same activity the latest schedule I set is the only one I understand I can have only 1 schedule for activity. ? I thought about setting a new schedule on the intervalDidEnd but, I get no interval did start if the current time is in the middle of the interval I set For example, now it is 15:00, and my previous interval started at 14:00 and ends at 16:00 but the user sets a new interval from 14:30 - 16:40 I call the deviceActivityCenter.stopMonitoring([someActivityName]) and get noIntervalDidEnd event Then I set the new interval successfully with deviceActivityCenter.startMonitoring(someActivityName, during: deviceActivitySchedule) and get no intervalDidStartEvent So how can I achieve several intervals? If I had gotten the events of the start and end it would be possible Thanks for the help
Posted
by
Post not yet marked as solved
3 Replies
812 Views
Hi there, In rare cases (about 0.2% of the time?), I'm seeing calls to startMonitoring on an instance of DeviceActivityCenter throw an error with localizedDescription "couldn’t communicate with a helper application." I am certain I am passing valid parameters to the startMonitoring call because sometimes a naive retry after a few seconds succeeds. Similarly, I am certain that FamilyControls permissions have been granted by the user. Was hoping to get more color from the systems team on what some causes of this error are and if it is avoidable by the programmer.
Posted
by
Post not yet marked as solved
1 Replies
1.1k Views
I'm looking for a way to check user Screen Time and trigger a notification after a specified amount of time on certain apps. I have the code from WWDC21 but I was wondering if I could get the code sample for the Worklog app created for WWDC22. Would really help as a reference point for building my project. Thank you!
Posted
by
Post not yet marked as solved
5 Replies
2.8k Views
We have developed a Parental/Self control app using Screen time API. We have used individual authentication to authorize the app, using the instructions here: https://developer.apple.com/documentation/familycontrols/authorizationcenter The problem is , that individual auth can be disabled easily , by the following steps: enter Settings app. in Settings app, click on the Parental/Self control app. click to disable screen time restriction. show the device owner's face/fingerprint. (or pin code) Why is that a problem: Parental control apps, or self-control apps, are about giving control to the software, To make it hard for the user to disable the restrictions. So using the flow I have introduced above, it's super-easy for a user to disable his Parental control restrictions, which misses the entire point of Parental/Self control idea. Furthermore, not only the user have the means to unlock his screen time restrictions, he also MUST have the means to unlock it. This makes Screen time (with individual auth) useless: I have a code ready to make a great parental control app for my clients, with amazing ideas, but I can't use the Screen time API unless this problem is fixed. Why child-parent auth is not enough: My clients are grownups people between ages of 15-40, that are interested in self-control, so they don't have iCloud child accounts. also, the child-parent auth solution forces my clients to give some control to other person, and my clients prefer their privacy. Some of them prefer self-control and not parental-control. What I suggest as a solution: 1: Give more options to users how to disable the Screen time restrictions. including: a second faceID / FingerPrint (that isn't the same as the one used to unlock the device) a second pin password. a string password 2: Give the users the option to choose to not have the device's owner Face/Finger/Pincode ID , as a method to disable the Screen time restrictions.
Posted
by
Post not yet marked as solved
5 Replies
960 Views
Hello, we have been using the SwiftUI Label with the Family Controls tokens (ApplicationToken, ActivityCategoryToken - https://developer.apple.com/documentation/swiftui/label/init(_:)-39rkz) And noticed that sometimes (quite rarely) the loading of the labels would take so long that it would freeze the entire app. Unfortunately as this only happened to our users (few times during user interviews) we aren't able to reproduce it on our devices and profile it. My guess is that this "mapping" of tokens to images happens entirely on the UI thread because it is supposed to be fast but sometimes there is huge delay and everything freezes. It would be great if the labels were somehow "prepared" on the background and the Label view would perhaps show some sort of loading and then get updated with the image of the app or category. This freezing was happening even when our app showed at most six labels on the screen. We tried some workarounds, namely to render the Label components in a backround and then use it as an image but instead of app icons we got yellow squares with red cross - probably due to privacy reasons. Anyone run into this issue? Any solutions?
Posted
by
Post not yet marked as solved
4 Replies
943 Views
The eventDidReachThreshold calls immediately not waiting for accumulated time. Example of setting the event: let events: [DeviceActivityEvent.Name: DeviceActivityEvent] = [ .monitorEducation: DeviceActivityEvent( applications: educationalApps.applicationTokens, threshold: DateComponents(minute: 15) ) ] What could be wrong?