Requesting authorization for self: FamilyControlsError code=3

Context I'm working on an iOS application that would use the Screen Time API and running into difficulties requesting authorization. This is for the user to manage their own screen time, not to be used with children account.

The Issue I'm receiving a FamilyControls.FamilyControlsError error=3 when requesting authorization for .individual, when running the application in the simulator. Also seeing The capability associated with "FAMILY_CONTROLS" could not be determined in Signing and Capabilities. The simulator is logged into an account that has screen time enabled. The Family Controls capability has already been added. My entitlements file has Family Controls set to Yes.

Questions

(1) Should I be able to have this function in the simulator before my Family Controls request gets approved? I've only recently submitted the form, but I wouldn't think this is an issue during development.

(2) Might issues with the Provisioning Profile be the cause of this issue? Again, I'm only trying to get this to work in development/debug at the moment.

(3) What else would you recommend attempting to resolve this issue?

I'm fairly new to iOS programming, so any help and patience is really appreciated. Not sure where to go from here. I've looked through other potentially realted posts but have not found solutions to this problem. Thank you!

    var body: some Scene {
        WindowGroup {
            VStack{
                ContentView()
            }
            .onAppear {
                Task {
                    do {
                        try await center.requestAuthorization(for: .individual)
                    } catch {
                        print("Failed to enroll with error: \(error.localizedDescription)")
                    }
                }
            }
        }
    }

This is the authorization code I am using.

Hey ! Granting screentime authorization doesn't work on the simulator, only on real devices. You cannot really test the screentime apis on a simulator, but you can add

#if targetEnvironment(simulator)

checks if you need to other parts of your app.

Requesting authorization for self: FamilyControlsError code=3
 
 
Q