Removing a system extension from a correctly-signed and setup "uninstaller" app fails

Hey folks,

I have an application that ships a CoreMedia I/O system extension to create a virtual camera.

We separately ship an "uninstaller" app, which is a notarised AppKit app. This uninstaller removes the app, containers, and the system extension via the following API:

let request = OSSystemExtensionRequest.deactivationRequest(forExtensionWithIdentifier: pluginIdentifier, queue: .main)
request.delegate = self
OSSystemExtensionManager.shared.submitRequest(request)

The OSSystemExtensionRequest API does correctly deliver metadata via propertiesRequest(forExtensionWithIdentifier: …), but when we attempt to remove the extension using the above snippet, we get a failure OSSystemExtensionError.extensionNotFound.

The uninstaller app is signed with the same entitlements and certificate as the host app. It also embeds a copy of the system extension as required by the API.

I think the crux of the issue is: Should this be expected to work? We're all code-signed correctly etc, and the only difference is that the removal request is coming from an app with a different bundle identifier to the one that installed it start with.

Thanks!

Answered by DTS Engineer in 773139022

Should this be expected to work?

No. There are three things in play here:

  • The container app, that is, the app in which the sysex is embedded

  • The app that activates the sysex

  • The app that deactivates the sysex

The System Extensions framework requires that all three be the same.

My advice is that you put your uninstall functionality into your main app.

Share and Enjoy

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

Accepted Answer

Should this be expected to work?

No. There are three things in play here:

  • The container app, that is, the app in which the sysex is embedded

  • The app that activates the sysex

  • The app that deactivates the sysex

The System Extensions framework requires that all three be the same.

My advice is that you put your uninstall functionality into your main app.

Share and Enjoy

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

Alright, thank you for the confirmation! We'll do that.

Removing a system extension from a correctly-signed and setup "uninstaller" app fails
 
 
Q