sparkle-project / Sparkle

A software update framework for macOS
https://sparkle-project.org
Other
7.37k stars 1.05k forks source link

Can't use didFinishUpdateCycleForUpdateCheck #2389

Closed nmilev-scribe closed 1 year ago

nmilev-scribe commented 1 year ago

Description of the problem

I am integrating our MacOS app with Sparkle and everything works properly. However, I now want to introduce a callback whenever the app is updated. I found out in the docs that I can do something like this:


class AppDelegate: SPUUpdaterDelegate {
    ...
    var updaterController: SPUStandardUpdaterController? = nil
    ...
    func applicationDidFinishLaunching(_ aNotification: Notification) {
            updaterController = SPUStandardUpdaterController(startingUpdater: true, updaterDelegate: self, userDriverDelegate: nil)
    ...
    }
    ...
    func updater(_ updater: SPUUpdater, didFinishUpdateCycleFor updateCheck: SPUUpdateCheck, error: Error?) {
        debugPrint("Update cycle finished")
    }
...
}

However, this callback is never executed. What am I doing wrong?

Do you use Sandboxing in your app?

No

Version of Sparkle.framework in the latest version of your app

2.1.0

Version of Sparkle.framework in the old version of app that your users have (or N/A)

2.1.0

Sparkle's output from Console.app

Steps to reproduce the behavior

[The more information provided and pasted verbatim, the easier it will be to diagnose an issue. If you can provide the affected application/binary and XML feed to reproduce an issue, share them]