This is how I am trying to create the configuration :Failed to save configuration Error Domain=NEFilterErrorDomain Code=3 "(null)"
Code Block let config = NEFilterProviderConfiguration() config.username = "Test User" config.organization = "Test Organization" config.filterBrowsers = true config.filterSockets = true config.serverAddress = "localhost" NEFilterManager.shared().providerConfiguration = config NEFilterManager.shared().isEnabled = true NEFilterManager.shared().saveToPreferences { (error) in if let saveError = error{ print("Failed to save configuration \(saveError)") return } }
I checked the following things :
The Team ID is consistent across the App, Control Extension and Data Extension.
The App ID prefix matches the Team ID.
The Bundle ID for Control Extension and Data Extension are children id of the App's Bundle ID.
The deployment target is set to 11.0 for the App, and the extensions.
The App and the extensions do have the content-filter-provider and get-task-allow entitlement. Moreover the device is supervised.
I also tried to manually create an unsigned profile consisting of the Content Filter Payload, which has the plugin Bundle Id which is the same as the App's Bundle ID.
How can I further debug this issue?
My understanding is that for development purposes having the get-task-allow entitlement should be enough to test the filter, and the device may not be supervised unless I am testing this on a Distribution build and in that case it would require an MDM profile. Is that correct?
Right, as the error indicates, somehow the NEFilterProviderConfiguration is not being set and loaded correctly. This could be due to you allowing it on the device, or just by it not being set correctly in NEFilterManager.shared().providerConfiguration = config. I would concentrate on this for debugging purposes.Failed to save configuration Error Domain=NEFilterErrorDomain Code=3 "(null)"
This is how I am trying to create the configuration :
Regarding:
Yes, for development purposes you can test like this.My understanding is that for development purposes having the get-task-allow entitlement
should be enough to test the filter, and the device may not be supervised unless I am
testing this on a Distribution build and in that case it would require an MDM profile.
Is that correct?
Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com