Help on auto update

Asked by Arnab

Hi All,
My application is working perfectly after integrating with Sparkle.Now I want to check for the updates automatically instead of going to the main menu and clicking on the "check for update", how do I do this.Also I should be able to set some option to enable and disable this and some timer value how often the updates are need to be checked.Like for example every 10 mins the update is being checked.

In the info.plist I tried setting the following options
SUAllowsAutomaticUpdates and SUEnableAutomaticChecks to "YES" but seems to be not working even reduced the SUScheduledCheckInterval value.

Does the function "checkForUpdatesInBackground" will help me on this to achieve the above?

Thanks in advance.
Arnab

Question information

Language:
English Edit question
Status:
Solved
For:
Sparkle Edit question
Assignee:
No assignee Edit question
Solved by:
Andy Matuschak
Solved:
Last query:
Last reply:
Revision history for this message
Andy Matuschak (andymatuschak) said :
#1

Check http://sparkle.andymatuschak.org/documentation/pmwiki.php/Documentation/Customization for more information on doing this.

Sparkle is checking for updates automatically, but it's doing so once an hour at most. If you want to see for yourself that automatic checks are working, delete the preferences file your app in ~/Library/Preferences.

You don't have to write any code to make the options you want—just bind to the keys listed on the linked documentation. http://developer.apple.com/documentation/developertools/Conceptual/IB_UserGuide/ConnectionsandBindings/chapter_7_section_4.html

Revision history for this message
Arnab (aganguly01) said :
#2

Hi,
SUEnableAutomaticChecks is clear to me like during the time of install if we delete the plist from dir it will ask to update or not ?
but SUAllowsAutomaticUpdates making this YES or NO couldn't find any difference.

I was thinking like if we SUAllowsAutomaticUpdates YES then the updated app should get installed by default, but seems to be not happening?

Secondly is it not possible reduce the value less than hour for SUScheduledCheckInterval.Suppose I keep the value for 10 sec in the info.plist is it going to take the default 1 hr value?
Thanks
Arnab

Revision history for this message
Best Andy Matuschak (andymatuschak) said :
#3

"but SUAllowsAutomaticUpdates making this YES or NO couldn't find any difference."

From the "Customizing Sparkle" documentation:

"SUAllowsAutomaticUpdates : Sparkle presents your users with the option to automatically download any available updates. Set this to NO to remove this option."

"Secondly is it not possible reduce the value less than hour for SUScheduledCheckInterval.Suppose I keep the value for 10 sec in the info.plist is it going to take the default 1 hr value?"

Yes, it takes min(60*60, value) for your own protection. People have DoS'd themselves by releasing an app with a really low check interval. If you really want to override this, you'll have to change the constant in SUUpdater.h.

Revision history for this message
Arnab (aganguly01) said :
#4

Thanks Andy Matuschak, that solved my question.