Replies: 1 comment 2 replies
-
The standard user driver doesn't do much here other than reply with This is in Swift and I don't exactly remember the details with the Swift concurrency model regarding Task 'n all, but I don't think the code looks wrong. I think this is also equivalent to: func showReady(toInstallAndRelaunch reply: @escaping (SPUUserUpdateChoice) -> Void) {
reply(.install)
}
This callback is for updates being automatically downloaded / installed in the background on app quit. This is an orthogonal path from the user driver. This callback and the user driver methods will not be called in the same update cycle, but the user driver can be presented in an update cycle sometime in the future, as long as you don't return YES in this callback, which would stop Sparkle's next update cycles. On the other hand, if you do return YES in that callback, it gives you the opportunity to invoke I also very recently added documentation page for custom user interfaces and it highlights some aspects that developers often get wrong about it (e.g. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
When
SPUStandardUserDriveris set as the driver, there's native UI which asks to "install and relaunch" - that works perfectly fine, app closes, updates and relaunches.In my case I provide custom
UserDriverthat overrides the necessary function as shown below (the goal is to get rid of OS native UI):That installs a new version, but doesn't close & relaunch the app. What may be wrong here? I also tried to
Task.yield()before returning.install, but that didn't help. Should I override other callbacks to enable the relaunch?As a temporary workaround the code listens to
willInstallUpdateOnQuitand quits the app, but in the end I need the app to auto relaunch.Version
2.8.1
Beta Was this translation helpful? Give feedback.
All reactions