The code corresponds to the backwards order of the FamilyControlsErrors seen in the documentation and it starts from 0. So restricted is Code 0, unavailable is Code 1, invalidArgument is Code 2.
If "5" is FamilyControlsError.authorizationCanceled, I am still a little confused on the order?
Post
Replies
Boosts
Views
Activity
@cinnamontoast
I opened FB10798095
If it indeed is a cancellation issue, then this log may be relevant:
error 2022-07-20 19:41:44.011573 -0400 FamilyControlsAuthenticationUI Attempt to present <FamilyControlsAuthenticationUI.ConfirmationViewController: 0x103032600> on <FamilyControlsAuthenticationUI.AuthenticationUIServiceViewController: 0x10550e700> (from <FamilyControlsAuthenticationUI.AuthenticationUIServiceViewController: 0x10550e700>) whose view is not in the window hierarchy.
@cinnamontoast
Hi there! Thank you for your help :)
How do I know FamilyControlsError.authorizationCanceled maps to "Code 5"? I can't find a number in the docs? I might be missing something obvious?
To note, this worked in Beta 1 and Beta 2. I can't get it to work in Beta 3.
I call:
do {
try await AuthorizationCenter.shared.requestAuthorization(for: .individual)
} catch {
}
It then prompts me: "Allow 'APP' to Manage Restrictions on This iPad"
I click "Continue."
FaceID succeeds, and it just returns the error:
Error Domain=FamilyControls.FamilyControlsError Code=5 "(null)"
@tjpaul I can't get anything to work properly in Beta 3 - waiting for Beta 4
remove the app and try install it again. Do you able to see the alert dialogue asking for authentication?
I have tried that, and it's the same effect.
In Beta 3, Screen Time API's are not working well for me. For example, I can't even disable Screen Time restrictions for my app in Beta 3 (well, that happened before I wasn't able to enable them).
@nemecek_f
Thank you for the update on it being resolved! I experienced the same initially.
Are there any other features that are not working for you with reports? For example, it doesn't look like app-token-based filtering is working for me?
Seems like I can't edit the post, but the answer is "yes." In Safari.
I was wrong in assuming that a user can't select websites in the FamilyActivityPicker. They can. However, for some reason, it took time for the websites to appear? Maybe due to a lack of recent Safari browser use?
A clarification on how websites start appearing in the FamilyActivityPicker would be helpful. Thank you! :)
+1 on this being an issue
+1 similar problem: TextField is not correctly displaying the value of the string its bound to
Same problem. Filed a radar. The issue for us is that with iOS 14.5, any lengthy 4K resolution video will fail with this error.
@KnolanNose
To summarize it, is that correct that Screen Time API can only be used for apps that deal with a child-parent relationship?
In other words, if people want to build an app that helps people manage distractions (ex. disable social media between 8 am - 6 PM), that is impossible?
If it is impossible, could this use-case be supported?