Failed to deactivate the network extension

Hi,
I have an app and network extension. As part of app, I have couple of APIs to activate/deactivate/enable/disable the network extension and exits from the app. I can do these operations by providing the argument to the app and I able to perform all operations from the terminal.

I have another C++ application, as part of this application i am handling activate/deactivate/enable/disable operations by invoking app with help of system() API. Here I able to activate/enable/disable the network extension but failed to deactivate the network extension and I am getting below error.

Code Block
Failed to authorize right 'com.apple.system-extensions.admin' by client '/Applications/NetopsFilter.app' [1298] for authorization created by '/Applications/NetopsFilter.app' [1298] (3,0) (-60007) (engine 106) error.


Pls help to fix my issue.

Replies

I can do these operations by providing the argument to the app and I
able to perform all operations from the terminal.

I see questions like this a lot so I want to clarify one thing: The SystemExtensions framework is intended to be used by a GUI app to load and unload system extensions in response to user actions. It’s not meant to be called from a command-line tool, regardless of how that command-line tool is packaged. Calling it from a command-line tool is unsupported and may yield weird results.

I recently filed a bug to get this clarified in the framework’s documentation (r. 70246597). We also have a bug on file to add more options for installing and uninstalling system extensions (r. 66312716), although if you have specific requirements in that space it wouldn’t hurt to file your own bug describing those requirements.

Finally, a lot of folks who ask about this are primarily focused on deploying to managed environments, and such environments can do more with system extensions using MDM.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"