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:

  1. Block apps on child device until parent allow to access them.
  2. Listen what apps are running on child device.
  3. 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

Answered by AsifmDev in 693390022
Accepted Answer

Thanks a lot! Going to discover it.

hi Team , thanks for sharing sample, we are getting below error

Error for Family Controls: Error Domain=FamilyControls.FamilyControlsError Code=2 "(null)"

Thanks

Hello Team Thanks for Quick Response !!

We are getting every time on device failure!!

 AuthorizationCenter.shared.requestAuthorization { result in

            // The request can either result in success or failure

            switch result {

            case .success():

                break

            case .failure(let error):

                print("Error for Family Controls: (error)")

            }

        } Why its happened, we have included Family Controls, but not getting any success

Can I get code examples of Homework app that was shown on WWDC21?
 
 
Q