I have an app which hosts network extensions(Packet Tunnel, Filter). I am facing uninstallation issue in scenario 2.
Uninstall API: OSSystemExtensionRequest.deactivationRequest
Scenarion 1:
- app version 1.0.0.1,
- extension inside app bundle version 1.0.0.1
- Installed extension -> version 1.0.0.1
Uninstallation works fine.
Scenarion 2:
- app version 1.0.0.2,
- extension inside app bundle version 1.0.0.2
- Installed extension -> version 1.0.0.1
Uninstallation fails with below error:
deactivation failed for client: /Applications/Remo Security Endpoint Client/ep-client.app/Contents/MacOS/ep-client, error: Error Domain=OSSystemExtensionErrorDomain Code=4 "(null)"
Question 1: is this by design or we can do something to make uninstall works in case application upgraded and tries to uninstall previous extension version.
Snippet from Apple Doc for API: OSSystemExtensionRequest.deactivationRequest
A deactivation request may require a restart before deactivating the extension. If the request succeeds but requires a restart to complete, the extension may still appear operational until the next restart.
Question 2: How do we know if restart needed or not?