Network extension process not getting auto launch after installation

I have a Network extension contains App Proxy and Content Filter.

After installation, extension process is not getting auto launch. We want to execute some code in main.swift.

extension process is getting launch on enabling either App Proxy or Content Filter.

how to launch network extension process after installation?

Installations Sample code:

let activationRequest = OSSystemExtensionRequest.activationRequest(forExtensionWithIdentifier: id, queue: .main)
OSSystemExtensionManager.shared.submitRequest(activationRequest)

Accepted Reply

Any help on how to request this entitlement?

If you plan to build an ES client, you can request the entitlement by following the link in the documentation.

IMPORTANT Don’t do this just because you want to run at load; such a request should be rejected.

There are few things we want to do such as monitoring interface changes using NWPathMonitor

OK, but what do you do with the info you glean from that?

start Unix domain server (there is another process which will connect to this server)

If you use XPC for this (via NEMachServiceName), that generates demand that’ll launch your sysex.

Share and Enjoy

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

Replies

Sysexes are effectively launchd daemons, and launchd generally starts jobs on demand. In the case of an NE sysex, that demand is a NE configuration that uses one of the sysex’s providers.

Note that this is different for other types of sysexes. For example, an ES sysex always has demand.

We want to execute some code in main.swift.

What are you trying to do with that code?

Share and Enjoy

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

@eskimo

an ES sysex always has demand.

You mean if i add com.apple.developer.endpoint-security.client to YES in capabilities, then it will auto launch after installation?

Any help on how to request this entitlement? Or any configuration which can cause demand for launch without using ES entitlements

What are you trying to do with that code?

There are few things we want to do such as monitoring interface changes using NWPathMonitor, start Unix domain server(there is another process which will connect to this server) etc

Any help on how to request this entitlement?

If you plan to build an ES client, you can request the entitlement by following the link in the documentation.

IMPORTANT Don’t do this just because you want to run at load; such a request should be rejected.

There are few things we want to do such as monitoring interface changes using NWPathMonitor

OK, but what do you do with the info you glean from that?

start Unix domain server (there is another process which will connect to this server)

If you use XPC for this (via NEMachServiceName), that generates demand that’ll launch your sysex.

Share and Enjoy

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