Some SPUUpdaterDelegate functions not getting called #2801
-
|
Question / possible bug or perhaps undocumented deprecation? Many SPUUpdaterDelegate functions do not get called. The following I have tested on a working app, and none of these seem to get called.
I have reproduced this on a stripped down sample project & delegate here https://github.com/tedslittlerobot/SparkleTest/blob/main/SparkleTest/Sparkles/SparkleyDelegate.swift This sample project loads an appcast xml file, and attempts (and fails by design) to download an update. Obviously without a more complete setup i am not expecting it to work, but in that sample project, i would expect to at least see The delegate is registered successfully, as the From a very quick look at the codebase, the only obvious reason I can see for not calling the delegate methods is if either the delegate method is not defined, or if the _updater property is nil/null. I can't find any logical reason for the latter, and the former should not in theory be an issue, as my delegate conforms to the protocol successfully. I shall continue digging, but if anyone else has any thoughts or pointers that would be appreciated! Am I using or registering the delegate incorrectly? Are some of these deprecated (i can't see any note of deprecation in the method documentation in the header files)? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Make sure to store the |
Beta Was this translation helpful? Give feedback.
-
|
Yep - that was the issue - thanks! |
Beta Was this translation helpful? Give feedback.
Make sure to store the
SparkleyDelegateinstance as a member / instance variable. It's common practice in Cocoa for delegates to be weakly retained. I'm guessing your delegate is being deallocated.