2

I'm trying to add a growl notification to an application for the mac but keep getting an error. I think I've followed the instructions right but something is wrong.Here's what I did:

I downloaded the growl SDK, added the Growl-WithInstaller.framework with "copy items into destination folder" checked.

Then added the framework to the build phase as copy files and set the destination to "frameworks".

I used an empty file to make the the growl registration ticket and dragged it to the copy bundle resources build phase.

Finally I added the GrowlApplicationBridgeDelegate to the @interface and the #import <Growl/Growl.h> to the header file.

When I build it I get an error saying that the Growl/Growl.h file was not found. It's there but it seems xcode cant find it. I imagine it's because I linked it wrong, any idea what the problem is?

I've tried the growl website and general linking help topics but I haven't found a solution.

Thanks.

Balanivash
  • 6,709
  • 9
  • 32
  • 48
Elbimio
  • 1,041
  • 2
  • 10
  • 25
  • I now used this method instead: accepted 1. In the project navigator, select your project 2. Select your target 3. Select the 'Build Phases' tab 4. Open 'Link Binaries With Libraries' expander 5. Click the '+' button 6. Select your framework 7. (optional) Drag and drop the added framework to the 'Frameworks' group and the no errors are made, though the notifications still aren't appearing. I think it might be that I'm not calling them properly, I'll try again tommorow. – Elbimio Jul 06 '11 at 06:26

1 Answers1

0

You have to link against the framework in your project build phases, not just copy the files.

To include a framework in your Xcode project, choose Project > Add to Project and select the framework directory. Alternatively, you can control-click your project group and choose Add Files > Existing Frameworks from the contextual menu. When you add an existing framework to your project, Xcode asks you to associate it with one or more targets in your project. Once associated, Xcode automatically links the framework against the resulting executable.

http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Tasks/IncludingFrameworks.html

Henrik P. Hessel
  • 36,243
  • 17
  • 80
  • 100
  • 1
    I'm using xcode 4, the only option is "add files". Nothing specifically about them being frameworks, which is why I think the problem is in linking. XCode 4 doesn't ask to associate with targets but there must be a way of doing it manually. – Elbimio Jul 05 '11 at 21:30