Activating extensions using swift result unwanted callbacks

I am trying to activate two separate extensions through my (single) application. When activating the extensions I set delegates for both activations to know when they are up and running.

// Start by activating the system extension
activationRequest = OSSystemExtensionRequest.activationRequest(forExtensionWithIdentifier: extensionIdentifier, queue: DispatchQueue.global(qos: .default))
activationRequest!.delegate = self
OSSystemExtensionManager.shared.submitRequest(activationRequest!)

When setting the delegates I am using two different classes - so “self” means something different for each extension. Each delegate implements the following method:

public func request(_ request: OSSystemExtensionRequest, didFinishWithResult result: OSSystemExtensionRequest.Result) {

And I see (by using os_log) that when enabling only one extension of the two, both of the “request: didFinishWithResult” get called. This was very strange to me because I was planning on acting upon an extension activation and interacting with it - but now I see that I get a callback to an extension as if it was activated although it was not. Is there something I am not taking under consideration or something I should do differently?

can you check the request.identifier in your request:didFinishWithResult handler?

@dgarfunkel, You replied here about a day ago and your reply got deleted. I’m not sure why. It’s not easy for me to un-delete your reply. Please re-post it.

Sorry about the inconvenience.

Share and Enjoy

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

Activating extensions using swift result unwanted callbacks
 
 
Q