Marshall Moutenot
Marshall Moutenot

Reputation: 121

Sparkle Always Up To Date

I recently added the Sparkle Framework [ http://sparkle-project.org/ ] to my cocoa application. When I add a dummy new item (version 1.1) to the appcast.xml, and subsequently try to update from version 1.0, it says "XXX 1.0 is currently the newest version available".

I've been at this for a while, and I've read the documentation [ https://github.com/sparkle-project/Sparkle/wiki ] quite a few times, with no success.

Here is my Info.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>BuildMachineOSBuild</key>
    <string>11E53</string>
    <key>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>CFBundleDisplayName</key>
    <string>Snappi</string>
    <key>CFBundleExecutable</key>
    <string>Snappi</string>
    <key>CFBundleIconFile</key>
    <string>snappi_icon.icns</string>
    <key>CFBundleIdentifier</key>
    <string>com.snppi.Snappi</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>Snappi</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>100</string>
    <key>DTCompiler</key>
    <string>com.apple.compilers.llvm.clang.1_0</string>
    <key>DTPlatformBuild</key>
    <string>4E3002</string>
    <key>DTPlatformVersion</key>
    <string>GM</string>
    <key>DTSDKBuild</key>
    <string>11E52</string>
    <key>DTSDKName</key>
    <string>macosx10.7</string>
    <key>DTXcode</key>
    <string>0433</string>
    <key>DTXcodeBuild</key>
    <string>4E3002</string>
    <key>LSApplicationCategoryType</key>
    <string>public.app-category.productivity</string>
    <key>LSBackgroundOnly</key>
    <false/>
    <key>LSMinimumSystemVersion</key>
    <string>10.6</string>
    <key>LSUIElement</key>
    <string>1</string>
    <key>NSHumanReadableCopyright</key>
    <string>Copyright © 2012 Marshall Moutenot All rights reserved.</string>
    <key>NSMainNibFile</key>
    <string>StatusBar</string>
    <key>NSPrincipalClass</key>
    <string>NSApplication</string>
    <key>SUFeedURL</key>
    <string>http://app.snppi.com/Snappi.xml</string>
    <key>SUPublicDSAKeyFile</key>
    <string>dsa_pub.pem</string>
</dict>
</plist>

And my appcast.xml (renamed to Snappi.xml):

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle"  xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Snappi</title>
    <link>http://app.snppi.com/Snappi.xml</link>
    <description>
      Send snapshots and files to friends in seconds. Snappi automatically generates a short link, so all you have to do is press paste.    
    </description>
    <language>en</language>
    <item>
      <title>Version 1.1</title>
      <sparkle:releaseNotesLink>
    http://app.snappi.com
      </sparkle:releaseNotesLink>
      <pubDate>Sat, 4 Aug 2012 20:26:11 +0000</pubDate>
      <enclosure 
    url="http://app.snppi.com/Snappi_1_1.dmg"
    sparkle:version="1.1"
    length="10518528"
    type="application/octet-stream" 
    sparkle:dsaSignature="MC0CFHaN/qB0aAb6V9rHMVHCLoBrTyJ8AhUAl0Wazod0rtzpxsvIaL0aYTg+KpQ=" 
    />
    </item>
    <item>
      <title>Version 1.0</title>
      <sparkle:releaseNotesLink>
    http://app.snappi.com
      </sparkle:releaseNotesLink>
      <pubDate>Sat, 4 Aug 2012 18:26:11 +0000</pubDate>
      <enclosure 
    url="http://app.snppi.com/Snappi_1_0.dmg"
    sparkle:version="1.0"
    length="10518528"
    type="application/octet-stream" 
    sparkle:dsaSignature="MC0CFHaN/qB0aAb6V9rHMVHCLoBrTyJ8AhUAl0Wazod0rtzpxsvIaL0aYTg+KpQ=" 
    />
    </item>
  </channel>
</rss>

Thanks!

Addition: Thinking about this more, should this result in behavior different from "You're already up to date" ? I feel like it would but I'm not sure.

Upvotes: 3

Views: 2065

Answers (2)

AMTourky
AMTourky

Reputation: 1200

I suggest sticking with the Major.Minor.Batch (0.4.12) versioning, and keep them the same on the app cast and in the info.plist file (CFBundleShortVersionString) of the project itself. you may also try this hassle-free build server that integrate seamlessly with Sparkle http://amtourky.me/2016/01/20/mac-os-x-continuous-delivery-sparkler-the-missing-build-server-for-sparkle/

Upvotes: 0

Mangled Deutz
Mangled Deutz

Reputation: 11413

Sparkle compares the sparkle:version attribute in the appcast to the CFBundleVersion in your plist (this is machine-readable versions).

So, here, your CFBundleVersion (100) indicates you have a newer (>1.0) version that what is in the appcast.

On the other hand, CFBundleShortVersionString (which corresponds to the sparkle:shortVersionString in the cast) is used for "user displayable" versions.

Upvotes: 14

Related Questions