I have created a Network Extension subclassing NEFilterDataProvider. From the App I have added provider configuration using NEFilterManager. But, once I start the app and extension, I am not getting any callbacks in extension.
None of below methods are being called:
- startFilter
- stopFilter
- handleNewFlow
Please suggest how to start filtering the content.
here is the code from host app.
[[NEFilterManager sharedManager] loadFromPreferencesWithCompletionHandler:^(NSError * _Nullable error) {
if(![NEFilterManager sharedManager].providerConfiguration){
NEFilterProviderConfiguration *aFilterConfig = [[NEFilterProviderConfiguration alloc]init];
aFilterConfig.username = @"USER";
aFilterConfig.filterBrowsers = YES;
aFilterConfig.serverAddress = @"Content Filter";
[[NEFilterManager sharedManager]setProviderConfiguration:aFilterConfig];
[[NEFilterManager sharedManager] setEnabled:YES];
[[NEFilterManager sharedManager] saveToPreferencesWithCompletionHandler:^(NSError * _Nullable error) {
if(error){
NSLog(@"%@",error);
}
}];
}
}];