Created
September 12, 2024 15:45
-
-
Save jaredh159/fcf620c263f6b181b42c5f557436d866 to your computer and use it in GitHub Desktop.
ios gertrude vpn screentime family controls research
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
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
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)