Hi,
I created content Filter Provider (DataProvider and ControlProvider) using below configuration, Everything was working as expectedly in development (saving FilterConfiguration where dataProvider and controlProvider processes are up and running), but when I tried to do the same in Adhoc distribution, NEFilterManager.shared().saveToPreferences failed with permission denied. On further investigation, I noticed below error in Console app from NEHelper
Sockets is the name of my app.
Sockets trying to create a content filter configuration through an app. Creating a content filter configuration is only allowed through profile in production version of Sockets.
Code:-
let newConfiguration = NEFilterProviderConfiguration()
newConfiguration.username = "userName"
newConfiguration.organization = "Personal"
newConfiguration.filterBrowsers = true
newConfiguration.filterSockets = true
NEFilterManager.shared().providerConfiguration = newConfiguration
NEFilterManager.shared().isEnabled = true
NEFilterManager.shared().saveToPreferences { error in
if let saveError = error {
NSLog("SocketsAPP : Failed to save the filter configuration: \(saveError)")
}
return
}
I ensured that the device I am testing is supervised ( made it through apple configurator and displays that device is supervised in settings page).
Do ControlFilterProviders work on Ad-hoc distribution, or am I missing anything here?
Regards,
Ravi Teja Govinduluri
On a supervised device you’re expected to configure your filter via a configuration profile. This makes sense when you think about it. This is a security feature on a supervised device; the device manager should be in charge of its configuration, not the user.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
ps DTS is closed 21 Dec through 1 Jan.