Post not yet marked as solved
Hi! DeviceActivityMonitors methods IntervalDidStart, IntervalDidEnd and eventDidReachThreshhold do not seem to be called on my application. Has anyone found a solution to this problem. Thank you in advance.
Post not yet marked as solved
Hi Team,
I am creating test app with screen time API, after the successful authorization(as child), I tried to turn off screen time under the option available in App.
Please find the steps below to repro the crash,
Open Settings App after successful authorization
Search for the App you have authorized
Try turn off the "Screen Time Restriction Settings", it'll turn off
Now go to your app
Again open the settings app and try to enable the "Screen Time Restriction Settings"
Now settings app will get crash.
Device : iPad Pro(10.5 inch), iPadOS 16.0 beta
Post not yet marked as solved
Hello,
I am not quite sure, how the shielding of entire categories of apps is supposed to work. The FamilyActivitySelection contains tokens for apps, websites and categories.
But the shield property of ManagedSettingsStore has only attributes applications and webDomains where I can configure the tokens from the family activity selection.
shield.applications = selection.applicationTokens
shield.webDomains = selection.webDomainTokens
I would expect there to be the property categories that expects Set<ActivityCategoryToken> and based on this shields apps in that category.
Post not yet marked as solved
I've been trying to get something to work with the Screen Time API, but almost everything related to it is unimplemented.
I checked following links
Device Activity
https://developer.apple.com/documentation/DeviceActivity
Managed Settings
https://developer.apple.com/documentation/ManagedSettings
Family Control
https://developer.apple.com/documentation/FamilyControls
Checked videos
https://developer.apple.com/videos/play/wwdc2022/110336/
Problems I faced
FamilyActivityPicker does not list installed apps on either of the guardian's or child's devices, it only lists the categories.
There is no way to allow setting up of restrictions for individual kids, if we have many kids in family.
If anyone gone through the same problem please upvote or if anyone has a solution please share
Thanks
As per Apple documentation , AuthorizationCenter API's.
func requestAuthorization(completionHandler:) is available on iOS 15.0 and deprecated on iOS16.0.
func requestAuthorization(for:) is available on iOS 16.0 and Later, but this API in still in Beta.
For an app that is targeting to release now(before 16.0 release), how do we code?
It appears that, if we use first api, it will deprecate when 16.0 comes and we don't know how it behave in 16.0.
For second api,we can't use 16.0 API, as its a Beta API now.It is a subject to change.
For first API, it is deprecated, for the second api, it is still in beta.
Question is, What is the best way to handle this in code, with minimum future updates to App?
Anyone from Family Controls team, Pls guide.
Thanks.
Post not yet marked as solved
To shield applications, we have to pass ApplicationTokens to DeviceAcvivityMonitorExtension. But I don't know the way.
I tried to pass it by using NSUserDefaults. However, it didn't work because ApplicationToken isn't encodable. So I can't save it in UserDefaults
Does anyone knows the way to pass ApplicationTokens to the Extension or another way to shield apps?
Post not yet marked as solved
I want to know the structure how to send restrict information from parent to child.
When parent sets restriction on parent's device, that information is reflected on the child's device and the child is restricted from using the app and device.
I want to know how the restrictions set on the parent's device are transmitted to the child's device. Also, I want to know how to do it. I could even call requestAuthorization and succeed.
Does anyone know this?
Post not yet marked as solved
Looks like a bug to me.
when i go to manage my child’s screen time and select Communication limits -> During Downtime after entering screen time pin the application crashes.
i’m using iphone Xs with latest ios 15.5 (19F77).
Post not yet marked as solved
Hi!
I'm playing around with the Screen Time API. I would like to let my app notify me every time I have used my device for 1 minute (any app). When I have been notified, I would like to reset the monitoring so that I will be notified again after another minute using my device.
I'm not sure how to accomplish this. In the main app, I currently start monitoring the following event with a schedule:
let event = DeviceActivityEvent(threshold: DateComponents(minute: 1))
let schedule = DeviceActivitySchedule(intervalStart: DateComponents(hour: 0, minute: 0, second: 1), intervalEnd: DateComponents(hour:23, minute: 59, second: 59), repeats: true)
Then, in the Device Activity Monitor Extension, I restart the same monitoring once the threshold is reached in eventDidReachThreshold.
However, eventDidReachThreshold is being called much more than once an hour. I have checked that I only have one monitoring event running, so duplicates does not seem to be a problem. So, my questions are:
Does my approach look OK? What am I missing?
Would this monitoring collect usage from all devices connected to the same Apple ID, i.e. my Mac, iPad, iPhones etc? If so, how can I make it only monitor usage on one of my devices (the iPhone running the app)?
Post not yet marked as solved
Hello,
When locking an app using Family Controls, inside the ShieldActionDelegate's handle(action:..) call (where we decide what to do with the shielded app) there is no way to call Face ID (LAContext). The error is: User interaction is required.
I understand why this is the case, but is there any other way around this?
Sometimes handle(action:) inside ShieldActionDelegate needs authentication or more details from the user in order to decide if the app should be unlocked.
Thank you.
Post not yet marked as solved
Hello,
Is it possible to make a FaceID authentication (LAContext) inside the ShieldActionDelegate extension in the func handle(action: ShieldAction...) callback?
Or is it possible to open the host app to do this authentication for us? Right now using LAContext.evaluatePolicy (with FaceID) gives this error: User interaction required. And there is no API to open the host app.
Or any other ideas how to have some extra options/operations in the handle caller?
Thank you
Post not yet marked as solved
the video mentioned that in .individual mode you can logout of icloud and delete apps (i.e. delete the blocker app (?)). is this during the block?
Post not yet marked as solved
I'm attempting to authorize family controls as .individual in the latest Xcode 14 beta (14A5228q).
do {
try await AuthorizationCenter.shared.requestAuthorization(for: .individual)
} catch {
print(error.localizedDescription)
dump(error)
}
Running this on the iPhone 13 Simulator (iOS 16), it throws the following error:
The operation couldn’t be completed. (FamilyControls.FamilyControlsError error 3.)
- Error Domain=FamilyControls.FamilyControlsError Code=3 "(null)" #0
- super: NSObject
I have a dedicated App ID and have enabled the "Family Controls" capability.
An Apple Systems Engineer suggested in this thread that "Requesting FamilyControls authorization on Simulator is supported by the ScreenTime API", although they don't say whether it actually works or not.
The rest of the thread seems to suggest people are also having issues when running on a physical device so I'm reluctant to install the iOS 16 Beta as I use my phone daily for work projects.
Is this FamilyControls authorization supposed to work in Simulator and are there any special considerations when authorizing as .individual?
Post not yet marked as solved
Where can I download screentime demo 'Worklog'? I couldn't found it on sample section? Apple didn't provide demo for ScreenTime in last WWDC neither.
Hi everyone,
I am trying to change the settings when the shield button is clicked.
When I called let store = ManagedSettingsStore() in the ShieldAction extension, store.shield.applications is nil. How can I access the instance created in the host app?
Besides, has anyone ever tried to change the shield UI after clicking a button on the shield screen? I've searched around but no luck. is there any way I can notify the host app for further actions? Any help would be appreciated! Thank you very much.
Sorry I don't know why I can't add the wwdc21-10123 tag.
Post not yet marked as solved
I started seeing failures authenticating to FamilyControls on a test device and I think I've tracked it down to the underlying FamilyControlsAgent process crashing:
Terminating app due to uncaught exception 'CKException', reason: 'recordName (AAAAAAAAAAAAAAAADH0toCzCpPWEtIr89SNmamgacnXdKjEEhIjr/hu5Hm1Rdg85TfYRKG6o9DcxOOuAXBsJp+1+Fcd/8vYor2SXoOuRNN06PQNsv3sVy9ifrjzFU1l29ZrB68jM5P1Z9JhvvQhB57htPPSwKew8ZjYZKI2a6EUnc9f7TpevWkuvNPtJUUOY6H/Zmh66KXgCySiMv5c32kItb5/CB+hWPOb9u44NxGultUqMhzciWjNfitDXo28sxD4ktFf2Afd0+xO2GCkYlSyP8uxV/SHC/tc2o91EV2z+z9fq) is too long'
I can't imagine what I might have fed it from my to cause it to generate such a name, and 15.4 seems to be working just fine with the same code.
Any ideas?
Post not yet marked as solved
On authorized child app FamilyActivityPicker randomly stops displaying apps. All categories are visible but sometimes under categories showing no apps.
I have added a workaround to call FamilyAuthorization every time before calling FamilyActivityPicker this improves the issue a bit but still around 30% it stops listing apps.
Post not yet marked as solved
Hi,
I've implemented the FamilyActivityPicker and I also noticed that it is the same picker that we get when we go to Setttings > Screen Time > App Limits > Add Limit.
When you tap on a given row, it will present all apps that are in that category. If you press the check mark on Category then on the Category row will be updated by showing the checkmark as selected and a "All" text to the right side, and on the app rows from that category the check marks will also be marked as selected.
This behavior is not consistent when I implement the FamilyActivityPicker. If I go through the same process the app rows won't be shown as selected.
Any suggestions on how to make this work? I'm attaching screen shots to illustrate my point.
Settings App
My FamilyActivityPicker Implementation
Post not yet marked as solved
Hello!
Does anybody know the release date of "Family Control" capability for Distribution?
iOS 15 was released, but "Family Control" is still available only for Development Distribution:
We can't create a Distribution provision profile for testing via TestFlight right now.
is the API now available for app-store releases? and if not, are there any timelines when it will be available for market releases? Or Any possibility of getting it released with the upcoming iOS 16?
[*Reposting this question to know the latest updates]
Hi all,
I am facing a problem following the code in the "Meet the Screen Time API" video. I've tried scheduling the monitoring time from
00:00 to 25:59 or some other time but functions in DeviceActivityMonitor are never being called.
I tried to print log from those functions, nothing shown. Is there any settings I've missed? In addition, I already changed the NSExtensionPrincipalClass value to my class name.
Any help would be appreciated!