Is there a programmatic way to check if a user has iOS Screen Time enabled on their device?
iOS Screen Time enabled check
Add a Comment
Is there a programmatic way to check if a user has iOS Screen Time enabled on their device?
I filed a feedback request, alongside this post FB11993689
kind of. I think the following works
do {
try await center.requestAuthorization(for: .individual)
} catch {
if let errorType = error as? FamilyControlsError {
switch (errorType) {
case .unavailable:
// If I'm understanding the documentation correctly, execution will reach this block if ScreenTime is disabled
}
}
source: https://developer.apple.com/documentation/familycontrols/familycontrolserror
I don't think so, because 'Screen Time' itself does not need to be enabled for the device in order to grant the permission. I'd view the iOS Screen Time "just" as another approved client to use the screen time frameworks.
But as the iOS screen time settings can interfere with the settings a permission-approved has set, it would be good to know if that can be the case.