Problem with Sparkle integration

Hi all,

I’ve been trying to add Sparkle to my app but have thus far failed. When I build and run my app the “Check for Updates” menu item remains grayed out. I have no idea why. I’ve tried making a new app and adding Sparkle to a blank app without problems. I have the Carbon framework linked in order to catch a modifier key held down on startup, but I can’t imagine any of my other code could be causing Sparkle to fail. There is no error, no reason given. It just doesn’t work.

Anyone have any idea what could be causing the problem? I know this isn’t much to go on, but I have no idea where to start or what to look for.

Thanks in advance for any help!

Hey castle,

I can tell you how I did (cause i had that problem as well), if you tell me on what Interface Builder Version you are on?

I’m using Xcode 3 and Interface Builder 3.

I can get Sparkle to work in a new Applescript Studio app, just not in my app. Which is a pain. :stuck_out_tongue:

Sorry for not posting right back … but I forgot about the post. :smiley:

Okay, I’ll just tell you step by step how I did it rather than starting right in the middle.

  1. Add the framework to Xcode by dragging it to the other sources folder. choose to copy files into the proj.

  2. then make a new build phase named “copy files.” drag the framework from the sources folder (in xcode) to the new build phase which is under targets.

  3. Open your nib file and from the file menu choose read class files. select all the headers from inside the framework which is inside your xcode project folder.

  4. now drag one of those blue boxes (NSObject) from the library. in the inspector, go to the identity tab (purple i)
    a) for the class choose SUUpdater
    b) add a new class action named: checkForUpdates:

  5. now drag a new menu item to your menu bar. select it. then right click (control + left click) and drag this blue line showing up to the blue box (updater NS Object). choose checkForUpdates

  6. save and back to xcode. open the file Info.plist (not infoplist.strings!!!). somewhere add the following line:

    SUFeedURL
    http://URL/TO/APPCAST.XML

  7. create the appcast file and your ready to go :smiley:

if you want a video or something with screenshots, let me know and ill be happy to make one.

doing a better pdf guide now. ill post it here in thext 24 hours :smiley: late night here so i will start it tomorrow sometime.

hold on tight :stuck_out_tongue:

oh this issue was so crazy-hair-pulling that i gave up so many times until I finally figured it out and its just sooo great to have it :smiley: i mean for applescript devs, something cocoa is always nice. LOL

Unfortunately that’s not working for me :frowning: I have no idea why. I can put it in a new application, even one of Apple’s examples, but not my own. Something must be interfering with it.

Castle,

I have posted up a tutorial on my site:

http://guimkie.com/tutorials/adding-the-sparkle-framework/

if you cant get it to work after that, then maybe you can just send me your proj and ill take a look at what the problem is: mail@guimkie.com

Good luck!

That’s a great tutorial! Unfortunately my problem persisted even after checking all the steps with it.

I did, however, find out how to make it work, in a way. My Active Build Configuration was set to Release, and the Check for Updates… button would remain grayed out. Setting the Active Build Configuration to Debug made things work. Really not sure why. Not sure how to get it fully working either. Deleting all the build files did not help.

did you try cleaning?

hm - debug is not going to be any good to you. if you actually check the logs in the debugger, does it say anything about sparkle? do you get warnings or something?

Cleaning unforunately didn’t do anything. I’ve found that in Console.app I get this error when it runs in Release mode:

Unknown class SUUpdater' in nib file, using NSObject’ instead.
Could not connect the action checkForUpdates: to target of class NSObject

I’m guessing this is the cause of it! But any ideas as to what is the cause of this?

did you add the framework to the build phase?

I think I have found the problem. My app includes the Carbon framework, which is used to recognise a modifier key held down on startup. It seems that Sparkle is not compatible with Carbon - you need another version that seems to be much harder to implement :stuck_out_tongue: I’m still not sure, though, since I don’t don’t see how it would be affected by the build configuration.

I definitely completed every step in the instructions and in your tutorial. :slight_smile:

the framework from my site (and the newest one) is not for carbon. aint gonna work. download this one:

http://sparkle.downtowncode.com/SparkleForCarbon.html

Max

I grabbed that but I’m not sure if it’s possible to integrate it into an Applescript app. I certainly don’t know how, anyway :stuck_out_tongue: I think I’ll give up on Sparkle until the next version of my app :stuck_out_tongue: