An error was reported when requesting permissions on devices with iOS 16.2 16.3. It is not an emulator.
Through the log records, the following Error message appears
- Error Domain=FamilyControls.FamilyControlsError Code=3 "(null)"
- Error Domain=FamilyControls.FamilyControlsError Code=4 "(null)"
- Error Domain=FamilyControls.FamilyControlsError Code=5 "(null)"
func requestScreenTime() async -> Bool { do { try await AuthorizationCenter.shared.requestAuthorization(for: .individual) return AuthorizationCenter.shared.authorizationStatus == .approved } catch { print("\(error)") return false } }