Replacement for -updaterDidRelaunchApplication: in Sparkle 2? #2727
Replies: 2 comments 2 replies
-
Unfortunately this does not exist in Sparkle 2. This was removed without alternative because it is often misused and not implemented in a good way in Sparkle 1. Also Sparkle can update apps on quit without relaunching, which the API may not make clear. Your issue is on the "misused" side because users can update apps without using the in-app built updater (e.g. quit app, download new version from web, replace bundle, reopen), which should not be handled differently here. |
Beta Was this translation helpful? Give feedback.
-
Thanks for replying.
There is a main app, and app extensions inside. I just used this callback as a place to re-enable app extensions on behalf of the user. I'm not the maintainer of Sparkle so I don't get to decide what's considered misused but I'm not sure what you mean? Sparkle being an "outside the Mac App Store" solution for app updates could make it easier for devs to implement a similar updating experience (and it does do this quite well for the most part). I'm not sure if Sparkle 2 is doing this in an XPC service or something now but it looks like Sparkle 1 just wrote a BOOL to NSUserDefaults which is pretty common thing to do in thousands of Mac apps for lightweight data persistence between app launches, so I don't see an issue with the implementation unless maybe you're in another process now. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Is there any replacement API for -updaterDidRelaunchApplication: in Sparkle 2? Previously I used this method to reenable app extensions after an update.
While it can be accomplished on the application side by using the same techniques Sparkle 1 used (either writing the current version string and comparing it on every app launch or marking it in updaterWillRelaunchApplication:, then checking it in -applicationDidFinishLaunchingWithOptions:) I believe the way the API worked before had less overhead because the delegate method was only called when the app was definitely relaunched from an update? Plus not getting the callback clutters up -applicationDidFinishLaunching a bit with additional checks. I don't know if Sparkle 2 supporting sandboxing makes accomplishing this more difficult? In any case the old -updaterDidRelaunchApplication: method was nice to have.
Possible Fix
[not obligatory, but suggest fixes or reasons for the bug]
Version
[please specify versions of Sparkle this is applicable to]
Beta Was this translation helpful? Give feedback.
All reactions