Reputation: 353
I was hoping that the appcast pubDate xml element would allow me to specify that my app cannot be considered for update unless the current date is the publish date (pubDate) or later.
Here's a sample appcast that includes the pubDate element inside the item element:
<item>
<title>Version 2.0 (2 bugs fixed; 3 new features)</title>
<sparkle:releaseNotesLink>http://you.com/app/2.0.html</sparkle:releaseNotesLink>
<pubDate>Wed, 09 Jan 2006 19:20:11 +0000</pubDate>
<enclosure url="http://you.com/app/Your Great App 2.0.zip" sparkle:version="2.0" length="1623481" type="application/octet-stream" sparkle:dsaSignature="BAFJW4B6B1K1JyW30nbkBwainOzrN6EQuAh" />
</item>
which was copied from Sparkle's site here: https://github.com/sparkle-project/Sparkle/blob/0ed83cf9f2eeb425d4fdd141c01a29d843970c20/Sample%20Appcast.xml
So the sequence is this:
Is that the purpose of the pubDate Sparkle element?
Does Sparkle use the pubDate to help determine whether an update should happen or not in addition to the version number?
Holding an app back from updating until some date is what I want, but I'm finding that pubDate doesn't seem to do that for me.
I couldn't find reference to the purpose of the pubDate in Sparkle docs: https://github.com/sparkle-project/Sparkle/wiki
Upvotes: 1
Views: 709
Reputation: 11413
Sparkle uses RSS, as you know, to list application updates inside enclosure tags (this is what they call "appcasting" - see: http://connectedflow.com/appcasting/)
The pubDate element is not specific to Sparkle - it's just a part of the RSS spec (see http://www.w3schools.com/rss/rss_tag_pubdate.asp ), and may/should be used by generic rss readers to present items/entries chronologically.
By itself, Sparkle does only one thing with pubDate as far as I can tell - and it's ordering update candidates (https://github.com/sparkle-project/Sparkle/blob/master/SUAppcast.m#L218)
Now, you can further customize the way Sparkle selects eligible updates by subclassing SUUpdater: see https://github.com/sparkle-project/Sparkle/wiki/bundles#wiki-subclassing-suupdater and especially the bestValidUpdateInAppcast
method: https://github.com/sparkle-project/Sparkle/wiki/customization
There, you should be able to further process items and achieve the behavior you have in mind.
Upvotes: 1