Post

Replies

Boosts

Views

Activity

How does child can unblock apps for some period of time using Screen Time API?
I have created the app that uses Screen Time API (Device Activity, Managed Settings and Family Control). I have allowed on child device block and unblock apps that are selected in familyPicker, but I have to add ability to unblock these apps for some period of time. I have tried this:             do {                     center.stopMonitoring()                     try center.startMonitoring(.unblock, during: schedule, events: [.encouraged: DeviceActivityEvent(                         applications: applications.applicationTokens,                         threshold: DateComponents(second: 30)                     )])                     print("Unblock apps")                 } catch {                     print("Error")                 } Maybe I have to use another way to do it? but this doesn't work for me.
1
0
1k
Nov ’21
FamilyControlsError Code=2 on Parent's Device
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     } }
1
0
991
Oct ’21
Can I get code examples of Homework app that was shown on WWDC21?
Hello, Apple! Thanks for sharing Screen Time API! Together with my team we want to develop one cool app, that is based on parent-child relationship. Unfortunately, we couldn't understand completely how Screen Time API works according documentations. Could you please provide us a code example of Homework demo app or maybe guid us on what kind of steps we must do in order to get next functionalities: Block apps on child device until parent allow to access them. Listen what apps are running on child device. We need integrate backend part that way that child will be able to deserve by his own ability to use other apps for some time. Is it possible to make such functionality in background? Looking forward for your response! Best regards Dmitriy
4
0
3.3k
Oct ’21