NEFilterManager.shared().loadFromPreferences { loadError in
DispatchQueue.global.async {
...
}
}
the code above is executed in an app-like deamon and completionHandler was never invoked, same code in an application works fine.(they are both packed with content filter network system extension)
is it because of the restriction of app-like deamon?
Probably. NEFilterManager
is meant to be used in the app that contains your NE provider appex or sysex. Calling it from other contexts isn’t supported.
ps Don’t use the Dispatch global concurrent queue. For an explanation as to why that’s generally a bad idea, see Avoid Dispatch Global Concurrent Queues.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"