We are developing an application that utilizes the Screen Time API. As outlined in Apple's documentation on family controls(https://developer.apple.com/documentation/familycontrols/), we are obtaining authorization as follows:
Task(priority: .high) {
do {
try await AuthorizationCenter.shared.requestAuthorization(for: .child)
NSLog("Authorization State ~ AUTHORIZED")
}catch let error {
NSLog("Authorization ERROR: \(error.localizedDescription)")
}
}
As mentioned in the documentation, once the app is authorized for family controls, the user should not be able to delete the app without giving the parent iCloud credentials. When deleting the app, the prompt for entering the parent iCloud credentials is shown sometimes and in some unknown cases, the prompt is not shown and the app is deleted without requiring the parent’s iCloud account.