Documentation

Asked by Tom

I know you work on this for free, but when can we get some documentation rather than having to route through header files?

Question information

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

Hopefully within a month or so. Bugs come first, you know. If I get some help fixing bugs, I'll be able to move to documentation.

Revision history for this message
Tom (me-unknowndomain) said :
#2

Sure, well makes sense! Thanks so much for all your hard work and perhaps you can tell me is there a notification or way to know tat Sparkle wants to quit so that I can stop my application from asking are you sure you want to quit, which it currently is doing via a applicationShouldTerminate:

Also my application doesnt seem to actually check for updates automatically. Is there some thing i can do to get this working? Or does it not happen after the program launches?

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

One of these SUUpdater delegate methods should help:
// Return YES to delay the relaunch until you do some processing; invoke the given NSInvocation to continue.
- (BOOL)shouldPostponeRelaunchForUpdate:(SUAppcastItem *)update untilInvoking:(NSInvocation *)invocation;

// Called immediately before relaunching.
- (void)updaterWillRelaunchApplication;

The API still may change before 1.5 final, but the latter is probably pretty safe.

As for the automatic update bit, it doesn't actually check on startup; it checks every day (by default). You can delete the SULastCheckTime key in your plist to force it to check automatically or you can change SUScheduledCheckInterval to something smaller. Be aware, though, that you can't make the interval less than an hour in order to keep you from accidentally releasing an app with a tiny interval and DDoS'ing yourself (some guys did this).

Revision history for this message
Tom (me-unknowndomain) said :
#4

I don't understand how to use this code....

- (void)updaterWillRelaunchApplication;

I put it in my app controller, but that didn't work, and theres no way to set App controller as the delegate of the Updater class in IB

I duno am i missing some thign?

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

The delegate method isn't going to do anything unless the updater knows what its delegate is.

You can set the delegate of the SUUpdater class by using the setDelegate method:
[[SUUpdater sharedUpdater] setDelegate:foo].

In 1.5b3, you should also be able to use IB to hook up the delegate outlet.

Revision history for this message
tornado (joe-flexgames) said :
#6

Tom-

If you still don't get this let me know - I got it working as a delegate.

You just add the line Andy mentioned above, then add this to your code:

- (void)updaterWillRelaunchApplication
{
//.....your code here
}

Can you help with this problem?

Provide an answer of your own, or ask Tom for more information if necessary.

To post a message you must log in.