Switching between appcasts in app

Asked by Chad Sellers

I would like to add a beta appcast to my app, where I can provide a preference and the user can select whether they want to update with betas or not. Does Sparkle support something like this inherently? Something like being able to change the feed URL in code at startup, or provide it through a delegate method?

Thanks,
Chad

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
Chad Sellers (chad-usefulfruit) said :
#1

I dug a little deeper into the Sparkle code after submitting my question, and I think I found my answer. It looks like SUUpdater's feedURL method first checks user defaults, so I can just set the default for SUFeedURL in user defaults to switch URL. In fact, the comment at the top of this method says just that. Let me know if there's a better way to do this, but it looks like this might do it.

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

There's actually a setFeedURL method on SUUpdater; you should use that to switch appcasts.

Revision history for this message
livings124 (livings124) said :
#3

Is there a way to stick both beta information and non-beta information in a single appcast (where a setting in the code would determine if you want to include the beta), or does it have to be done with multiple appcasts?

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

No. It has to be done with multiple appcasts.

Revision history for this message
Chad Sellers (chad-usefulfruit) said :
#5

Thanks Andy. I was misunderstanding setFeedURL, as I didn't realize it was persistent. Works great.

Revision history for this message
Chad Sellers (chad-usefulfruit) said :
#6

Thanks Andy Matuschak, that solved my question.