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.
Hi, I am trying to make a simple app that just displays the users ScreenTime but I am having trouble finding resources/examples/ on how I can implement the ScreenTime framework. Is there any chance you could share your code so I could learn by viewing it? Thank you in advance