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

jaredh159 commented Oct 3, 2024

to add the entitlement (after getting it from apple) see https://forums.developer.apple.com/forums/thread/701874

seemd to work, clicked on the identifier, and clicked "Additional capabilities" tab

Screenshot 2024-10-03 at 11 15 22 AM

got a message "Adding or removing any capabilities will invalidate any provisioning profiles that include this App ID and they must be regenerated for future use.", clicked "Confirm", hope that was right! (testing with skunk bundle id)

@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