Post not yet marked as solved
@jimm123034
Try to create the project as below,
Create a new project as Single App
Enable Family Control capabilities
Now add required frameworks one by one and activate it.
I used Xcode 14.3beta
Post not yet marked as solved
https://github.com/agarrharr/Homework
Just try this out..
Post not yet marked as solved
@kgaidis
Please find the error code mapping below,
enum FamilyControlsError : LocalizedError {
case restricted
case unavailable
case invalidAccountType
case invalidArgument
case authorizationConflict
case authorizationCanceled
case networkError
@available(iOS 16.0, *)
case authenticationMethodUnavailable
}
For your case error is like "The parent or guardian canceled a request for authorization."
Do one thing, remove the app and try install it again. Do you able to see the alert dialogue asking for authentication?
Post not yet marked as solved
Any findings or update you got respect to developing guardian app using screen time api?
Post not yet marked as solved
I am able to block the app with the above code, what I missed was Family control capability not added in Device Activity Monitor extensions.
Post not yet marked as solved
Apple didn't share any demo app for Screen Time API as far as I know.
We're creating test apps based on the code shown in WWDC as well as information shared in wwdc21-10123 forum tag.
My suggestion just go through all the topic listed under the forum tag wwdc21-10123, you'll have fair idea.
Post not yet marked as solved
Are you trying to run it in simulator? Try it in real device with child Apple account(has to be part of family sharing) logged in.
When, I ran it in simulator received the same error code 3 for the domain FamilyControls.FamilyControlsError.
Hi,
One of my friend suggested to debug extension process and check console which helped.
I received the call back to the code and while observing console logs expected events fired for start and end.
But I am not sure why print statement doesn't print any from extension principal class file.
Console logs under the process 'DeviceActivityMonitorExtension' below,
Interval started for daily
Interval ended for daily
Hope this will help.
Post not yet marked as solved
Hi,
I too faced the problem, one of my friend suggested to debug extension process and check console which helped.
I received the call back to the code and while observing console logs expected events fired for start and end.
Raised this thread too - https://developer.apple.com/forums/thread/689460
Console logs under the process 'DeviceActivityMonitorExtension' below,
Interval started for daily
Interval ended for daily
Hope this will help.