Skip to content

Instantly share code, notes, and snippets.

@jaredh159
Created September 12, 2024 15:45
Show Gist options
  • Save jaredh159/fcf620c263f6b181b42c5f557436d866 to your computer and use it in GitHub Desktop.
Save jaredh159/fcf620c263f6b181b42c5f557436d866 to your computer and use it in GitHub Desktop.
ios gertrude vpn screentime family controls research
@jaredh159
Copy link
Author

func requestAuthorization() async -> Bool {
    let center = AuthorizationCenter.shared
    do {
      try await center.requestAuthorization(for: .child)
      // giving me a FamilyControlsError.invalidAccountType
      // https://developer.apple.com/documentation/familycontrols/familycontrolserror
      // https://developer.apple.com/documentation/technotes/tn3134-network-extension-provider-deployment
      // legacy requestAuthorization(completionHandler:) ALWAYS requests child auth
      // according to TN3134 <-- 👋
      // center.requestAuthorization { result in
      //   print(result)
      // }
      self.messages.append("reqAuthorization success")
      return true
    } catch {
      self.messages.append("reqAuthorization failure")
      self.messages.append("error \(error)")
      self.messages.append("e reflect: \(String(reflecting: error))")
      return false
    }
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment