Hi All,
We have an app installed in /Applications/MyApp.app that embeds a system extension.
Everything works as expected and the system extension (DNSProxy) is installed and runs perfectly.
We also have a .pkg "Uninstaller" that alongside other tasks runs a rm -rf /Applications/MyApp.app in the pkg preinstall script.
When we run the uninstaller all the files are deleted and all the processes are stopped excepted the System extension that is still alive and kicking:
The documentation states:
But apparently, this isn't the case if the app is removed in this specific way.
How are we supposed to uninstall the System Extension? running deactivationRequest(forExtensionWithIdentifier:queue:) method from the uninstaller pkg would be VERY tricky.
Update:
This entire post could be summarised with:
Removing an app from Terminal doesn't remove the embedded system extension.
This seems a HUGE limitation... how are we supposed to remove system extension via MDM or SSH for instance?
We have an app installed in /Applications/MyApp.app that embeds a system extension.
Everything works as expected and the system extension (DNSProxy) is installed and runs perfectly.
We also have a .pkg "Uninstaller" that alongside other tasks runs a rm -rf /Applications/MyApp.app in the pkg preinstall script.
When we run the uninstaller all the files are deleted and all the processes are stopped excepted the System extension that is still alive and kicking:
Code Block systemextensionsctl list * * xxxxxxxxxxxx com.xxxxxx.macos.netext.dnsproxy (2.0.0/22) MyAppNE [activated enabled]
The documentation states:
Code Block language Uninstall a System Extension The system automatically uninstalls any system extensions when the user deletes the corresponding app. You can also uninstall a system extension by creating a deactivation request. Call the deactivationRequest(forExtensionWithIdentifier:queue:) method of OSSystemExtensionRequest and submit the resulting object to the OSSystemExtensionManager.
But apparently, this isn't the case if the app is removed in this specific way.
How are we supposed to uninstall the System Extension? running deactivationRequest(forExtensionWithIdentifier:queue:) method from the uninstaller pkg would be VERY tricky.
Update:
This entire post could be summarised with:
Removing an app from Terminal doesn't remove the embedded system extension.
This seems a HUGE limitation... how are we supposed to remove system extension via MDM or SSH for instance?
The documentation here is correct. Running a deactivationRequest request on the system extension is the best way to do this because you are performing this action from the container app. When rm -rf is run from the terminal it is does not remove the system extension like it would when the user deletes the container app from the /Applications directory by hand. My advice would be to build a workflow here that runs through the deactivationRequest process in your container app.
Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com