Why I can get another NEFilterManager instance than it in my App


NEFilterManager * mgr = [NEFilterManager sharedManager];
...
NSString *description = [mgr localizedDescription]

Hi Experts,

I can get another NEFilterManager instance if there are multi-network profilers in the Network panel.
The above code is in a different background process(bundle id) than the main process without any entitlement. I can only get the correct NEFilterManager instance associated with the main process, is it by design? how to get a specified NEFilterManager instance in the background process?




Answered by Systems Engineer in 657772022

The above code is in a different background process(bundle id) than the main process without any entitlement. I can only get the correct NEFilterManager instance associated with the main process, is it by design? how to get a specified NEFilterManager instance in the background process?

Yes, the sharedManager returns a NEFilterManager object for the calling process. Unlike other Network Extension Managers, NEFilterManager does not provide a loadFromPreferencesWithCompletionHandler completion handler to evaluate previously saved managers to determine which manager belongs to the container app. Does that address your question?


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Accepted Answer

The above code is in a different background process(bundle id) than the main process without any entitlement. I can only get the correct NEFilterManager instance associated with the main process, is it by design? how to get a specified NEFilterManager instance in the background process?

Yes, the sharedManager returns a NEFilterManager object for the calling process. Unlike other Network Extension Managers, NEFilterManager does not provide a loadFromPreferencesWithCompletionHandler completion handler to evaluate previously saved managers to determine which manager belongs to the container app. Does that address your question?


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Why I can get another NEFilterManager instance than it in my App
 
 
Q