I have tried to use Screen Time API. The problem is that I can't get access to FamilyControl framework on parent's device. What should I do to get access?
class AppDelegate: NSObject, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
AuthorizationCenter.shared.requestAuthorization { res in
switch res {
case .success():
print("===SUCCESS AUTHORIZATION===")
case .failure(let error):
print(error.localizedDescription)
}
}
return true
}
}
AuthorizationCenter.shared.requestAuthorization can only used on a device with Child iCloud account. It can not be used on Parent's device. Purpose of this request is to Authorize A parent iCloud account on child device so that a parent can supposedly manage the child ScreenTime
quoting an answer i got for this question from: AsifmDev