Update check progress bar just flashes, does not show result

Asked by Jeremy Sequoia

During startup for my application, I added the following code:

[[SUUpdater sharedUpdater] resetUpdateCycle];
[[SUUpdater sharedUpdater] checkForUpdates:X11App];

fprintf(stderr, "Updating: %d\n", [[SUUpdater sharedUpdater] updateInProgress]);

A progress bar quickly flashes on the screen and disappears. The result is "true" for updateInProgress. There is no network activity in the background after this, so I'm certain it's not downloading anything.

Shouldn't I be presented with a prompt letting me know that an update is available? My appcast seems correct:
http://static.macosforge.org/xquartz/downloads/sparkle/release.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>XQuartz Changelog</title>
      <link>http://xquartz.macosforge.org/downloads/sparkle_release.xml</link>
      <description>Most recent changes with links to updates.</description>
      <language>en</language>

      <item>
         <title>Version 2.4.0_beta3</title>
         <sparkle:releaseNotesLink>http://xquartz.macosforge.org/trac/wiki/ChangeLog?format=txt</sparkle:releaseNotesLink>
         <pubDate>Fri Jul 17 11:44:42 PDT 2009</pubDate>
         <enclosure url="http://xquartz.macosforge.org/X11-2.4.0_beta3.dmg" sparkle:version="2.4.1" sparkle:shortVersionString="2.4.0_beta3" length="73039779" type="application/octet-stream" sparkle:dsaSignature="MC4CFQCGmyDezkRHLy+Fo2QkaSk+xFh8EgIVAJv1O2FYJDVH893bEJXpFb92+6vG" />
      </item>

   </channel>
</rss>

And my Info.plist should trigger the update:
 <key>CFBundleVersion</key>
  <string>2.4.0</string>

 <key>SUEnableAutomaticChecks</key>
  <true/>
 <key>SUPublicDSAKeyFile</key>
  <string>sparkle.pem</string>
        <key>SUFeedURL</key>
                <string>http://static.macosforge.org/xquartz/downloads/sparkle/release.xml</string>

---

What might the problem be? Why isn't a dialog box popping up after the checkForUpdates?

Note that SUUpdater is not instantiated in my nib. That is why I call resetUpdateCycle.

Question information

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

Anything interesting in your console output? Does your app have a CFBundleIdentifier?

Revision history for this message
Jeremy Sequoia (jeremyhu) said :
#2

Nothing interesting on stderr/stdout. CFBundleIdentifier is org.x.X11.

Here's the entire Info.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
 <key>CFBundleDevelopmentRegion</key>
  <string>English</string>
 <key>CFBundleExecutable</key>
  <string>X11</string>
 <key>CFBundleGetInfoString</key>
  <string>X11</string>
 <key>CFBundleIconFile</key>
  <string>X11.icns</string>
 <key>CFBundleIdentifier</key>
  <string>org.x.X11</string>
 <key>CFBundleInfoDictionaryVersion</key>
  <string>6.0</string>
 <key>CFBundleName</key>
  <string>X11</string>
 <key>CFBundlePackageType</key>
  <string>APPL</string>
 <key>CFBundleShortVersionString</key>
  <string>2.4.0</string>
 <key>CFBundleVersion</key>
  <string>2.4.0</string>
 <key>CFBundleSignature</key>
  <string>x11a</string>
 <key>CSResourcesFileMapped</key>
  <true/>

 <key>SUEnableAutomaticChecks</key>
  <true/>
 <key>SUPublicDSAKeyFile</key>
  <string>sparkle.pem</string>
        <key>SUFeedURL</key>
                <string>http://xquartz.macosforge.org/downloads/sparkle/release.xml</string>

 <key>NSHumanReadableCopyright</key>
  <string>© 2003-2009 Apple Inc.
© 2003 XFree86 Project, Inc.
© 2003-2009 X.org Foundation, Inc.
</string>
 <key>NSMainNibFile</key>
  <string>main</string>
 <key>NSPrincipalClass</key>
  <string>X11Application</string>
</dict>
</plist>

Revision history for this message
Jeremy Sequoia (jeremyhu) said :
#3

Ok, I think I figured out why it wasn't showing the install dialog. The pubDate was older than the SULastCheckTime. After making pubDate > SULastCheckTime, the install dialog is being presented:

To simulate older check time:
$ defaults write org.x.X11 SULastCheckTime -date "2009-07-01 00:00:00 -0700"