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.