Unable to load Family Activity Picker ScreenTimeAPI

I've created a test project in which I can successfully receive the FamilyControl authorization for the child device.

Then on the parent device(where the parent account is logged in as the iCloud account), I basically used the following test code as provided in the documentation FamilyActivityPicker

struct ExampleView: View {
  @State var selection = FamilyActivitySelection()
  @State var isPresented = false

  var body: some View {
    Button("Present FamilyActivityPicker") { isPresented = true }
    .sheet(isPresented: $isPresented) {
      FamilyActivityPicker(selection: $selection)
    }
    .onChange(of: selection) { newSelection in
      let applications = selection.applications
      let categories = selection.categories
      let webDomains = selection.webDomains
    }
  }
}

I get the following error on the view :

The operation couldn't be completed. (FamilyControls.ActivityPickerRemoteViewError error 1)

For authorization errors I was able to look into the FamilyControlsError enum in the FamilyControls framework, but I can't find an enum for ActivityPickerRemoteViewError.

Any idea as to why it's failing to load?

I believe I am using the right setup in terms of the account that I am logged in to. I do have the FamilyControl capability, and I was able to successfully provide authorization for the child. Is there any other prerequisite that needs to be done to load the FamilyActivityPicker?

Also, Do you know where I can find the error codes corresponding to ActivityPickerRemoteViewError ?

What does error 1 indicate?

I do see the following in the console logs :

2021-06-09 16:42:38.430112-0400 NN Family Control[849:38700] [lifecycle] [u 9F1F2B94-76F6-4D8F-ADE3-6D1C14EE5074:m (null)] [com.apple.FamilyControls.ActivityPickerExtension(1)] Connection to plugin interrupted while in use.
2021-06-09 16:42:38.476929-0400 NN Family Control[849:38704] [lifecycle] [u 9F1F2B94-76F6-4D8F-ADE3-6D1C14EE5074:m (null)] [com.apple.FamilyControls.ActivityPickerExtension(1)] Connection to plugin invalidated while in use.

Replies

Please report this issue using Feedback Assistant.

Same issue here. @nmik2020 Were you able to resolve it?

@LoguLogu No I've not been able to resolve it. I do see the preview of the categories in Preview screen but it doesn't load on the device.

  • Same here, was thinking of opening a Radar, seems like there might be an actual issue.

Add a Comment

@LoguLogu, @nmik2020 This seems to be working with beta 2

@caguilar51 I can see that the picker is loading and showing a bunch of categories, but it doesn't show any apps inside each category. What behavior are you seeing?

@nmik202 I am seeing the same behavior as you. A list of categories but no application on either device.

Same behaviour as mentioned. Category previews but no applications. It is the same for child and parent.

This has been fixed in the beta 2 version of Xcode

@Joshli I'm on Xcode beta 2 and still only categories are presented without installed apps.

@michalfromturany I mean the listing is still not showing but the ActivityPicker opens properly on parent device

Add a Comment

I can see the list of Applications on the child device after successive requestAuthorization calls. Still can't see it on the Parent device.

  • Hi, I tried your code but I'm unable to see the list of Applications on the child device. How can I show a list of apps? Can you please explain some steps?

Add a Comment

I'm in the same boat. On iOS 15 beta 2 and Xcode beta 2 and the FamilyActivityPicker shows categories on both guardian and child device but the categories don't expand to show any apps.

Furthermore, I don't understand how this would work on the guardian device. I would want to see a list of a specific child's apps, but I don't see anyway to specify which child of my 4 kids the FamilyActivityPicker should show apps for.

Any Update here? I am having the same issue of no apps popping up under the categories in the FamilyActivityPicker

On Beta 4, it shows up on the child device, but not on the parent device. :-/

  • I am still not able to get it working on child's device. Did you make any specific changes to the code?

  • Same here, works on child's device but not on the parent device.

Add a Comment

Same here FamilyActivityPicker showing categories and Apps (both) on Child device but only showing categories with No apps on Parent device. Xcode 13 beta 4 iOS 15 beta 4