Repository navigation
Supported coordination for removing an app with a pending or deferred Sparkle2 update #2938
|
We are evaluating Sparkle 2.10.0 for an unsandboxed macOS app with a root-owned app-bundle destination and an external install/uninstall command. For one application's cooperating updater and installer, what supported public API or documented lifecycle sequence should removal follow when an earlier update may be downloaded, deferred or already installing? In particular: can the app drain or cancel that work so it cannot later republish the bundle after removal, and is finishing the pending update and relaunching a supported completion boundary? We understand that |
Replies: 2 comments
|
If the user is using the Doing this with programmatically with Sending SIGTERM to Autoupdate process is another possibility but you need to make sure you're killing the one associated with your app, and not with another app (Autoupdate lives inside the framework/app). Maybe SMJobRemove() can terminate the process too but I don't recall if that requires authorization. It is what 2.11 can do for replacing an existing update if an even newer update becomes available (at least in the non-auth case). |
|
Thanks, this is really helpful, especially the clarification that skipping cancels the pending/deferred update, but also marks that release as skipped. We've since narrowed our install/uninstall commands to a developer workflow, with an explicit requirement not to run them while Sparkle is active or has pending work. We'll stick with that rather than add our own cancellation layer or depend on internal XPC/process termination. If the updater state is unclear, we'll stop the maintenance operation. Thanks for taking the time to explain the options, and for maintaining Sparkle! 🙇 |
If the user is using the
SPUUpdaterin this state (e.g. they check for updates), they can skip the update, which cancels the pending/deferred update and terminates Autoupdate. But it also marks that update as "skipped" as a side effect so they won't be notified of that update again unless they trigger a manual user-initiated check.Doing this with programmatically with
SPUUpdateris going to be convoluted (unless perhaps if you own theSPUUserDriverlifecycle, but even then apps can be automatically staged to install without the user driver). Underneath it is establishing a XPC connection to Autoupdate (tied to the bundle ID being updated) and sending a message to cancel the installation,…