2

I'm totally stuck in a operation that might be really simple...adding Sparkle to a project created in Xcode 4. I did these operations :

  • Added Sparkle.framework to my project (drag&drop)
  • Added to "link Binary With Libraries" but it generated this error:

    dyld: Library not loaded: @loader_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle Referenced from: /Users/me/Library/Developer/Xcode/DerivedData/MyApp-esurnmkwvxcgcxbbrdgsobkoimfv/Build/Products/Release/Myapp.app/Contents/MacOS/MyApp

    Reason: image not found

  • Removed to "link Binary With Libraries"
  • Added to "Copy Bundle Resources"
  • Add an instance on SUUpdater to mainMenu.xib
  • Did every config step required (create the private Key, upload file and rss etc..)

When i launch my application i get a warning :

Unknown class 'SUUpdater', using 'NSObject' instead. Encountered in Interface Builder file at path /Users/...etcetcetc

And obviously due to this warning the updater never starts. What I missed?

MatterGoal
  • 16,038
  • 19
  • 109
  • 186
  • What was the error when you added the link step? You'll need that, because else the unarchiver doesn't know what to do with a SUUpdater object. – Philippe May 16 '12 at 19:31
  • @phil I edited my answer with details about the error – MatterGoal May 16 '12 at 19:43
  • Are you sure that your version of Sparkle is built for all architectures? What does lipo -info /Frameworks/Sparkle.framework/Versions/A/Sparkle show? – Philippe May 19 '12 at 16:42

1 Answers1

5

You also need to import the Sparkle framework into the header file for your class:

#import <Sparkle/Sparkle.h>

@implementation YourClass : NSObject
{

}

This isn't mentioned in your question as one of the steps you've taken, hence I'm assuming it hasn't been done.

Jonathan Head
  • 428
  • 3
  • 7
  • I needed to do this in a Cocoa/Applescript project recently — note that the file to add the import line to would be `main.m` under ‘Supporting Files’. – D Schlachter Jan 28 '15 at 00:00