Framework not found, Compiler warnings and lots of console lines

62 views
Skip to first unread message

Matthew Boehm

unread,
Feb 12, 2014, 2:01:46 PM2/12/14
to growl-de...@googlegroups.com
Hello,
I'm trying to integrate Growl in to my application. I downloaded the latest Growl.Framework and added it to my project. (XCode 5.0.2). In Project -> Build Phases, under 'Link Binary with Libraries' there are two entries "Cocoa.Framework" and "Growl.Framework". Both listed as 'Required'.  Under 'Copy Bundle Resources' there are 8 items, one of which is "Growl.Framework ...in MyApp/Frameworks".

Problem #1:

When I build the app and attempt to run, it crashes with this:

dyld: Library not loaded: @executable_path/../Frameworks/Growl.framework/Versions/A/Growl Referenced from: 
 /Users/drmac/Library/Developer/Xcode/DerivedData/MyApp-bhqduygklqrkkveqhhghxunyahsp/Build/Products/Debug/MyApp.app/Contents/MacOS/MyApp
Reason: image not found

If I look in to the built app, I don't see a frameworks directory:

ls -la MyApp.app/Contents/
total 16
drwxr-xr-x 6 drmac staff 204 Feb 12 12:47 .
drwxr-xr-x 3 drmac staff 102 Feb 12 12:47 ..
-rw-r--r-- 1 drmac staff 1559 Feb 12 12:47 Info.plist
drwxr-xr-x 3 drmac staff 102 Feb 12 12:47 MacOS
-rw-r--r-- 1 drmac staff 8 Feb 12 12:47 PkgInfo
drwxr-xr-x 8 drmac staff 272 Feb 12 12:47 Resources

It is in here:

ls -la MyApp.app/Contents/Resources/
total 40
drwxr-xr-x  8 drmac  staff    272 Feb 12 12:47 .
drwxr-xr-x  6 drmac  staff    204 Feb 12 12:47 ..
drwxr-xr-x  3 drmac  staff    102 Feb 12 12:47 Base.lproj
-rw-r--r--@ 1 drmac  staff    396 Feb 12 12:47 Growl Registration Ticket.plist
drwxr-xr-x  6 drmac  staff    204 Feb 12 12:47 Growl.framework
drwxr-xr-x  4 drmac  staff    136 Feb 12 12:47 en.lproj

So why isn't it A) being copied to the correct destination and B) not being loaded?

So I manually created a Frameworks directory in Contents and moved Growl.framework there and the app runs. I shouldn't have to do that. I must be missing a setting that says to copy the framework.

Problem #2: 
I have no need for callbacks. So, according to the documentation, I just have to do this:

[GrowlApplicationBridge setGrowlDelegate:@""];

That produces a compiler warning: Sending 'NSString *' to parameter of incompatible type 'id<GrowlApplicationBridgeDelegate>'
What's the best way to handle this? Is setting to nil OK? Seems to be so far in my testing.

Problem #3:
Last one. If I do all the above, and properly name the .plist to "Growl Registration Ticket.growlRegDict", when the app runs, I get about 100 lines of this in console:

2014-02-12 12:59:57.135 GuildMonitor[60454:303] Failed to notify due to missing registration, queue and reregister

I don't understand that. What didn't I do?

Thanks!

-Matthew

Rudy

unread,
Feb 13, 2014, 9:49:31 AM2/13/14
to growl-de...@googlegroups.com


On Wednesday, February 12, 2014 2:01:46 PM UTC-5, Matthew Boehm wrote:
Hello,
I'm trying to integrate Growl in to my application. I downloaded the latest Growl.Framework and added it to my project. (XCode 5.0.2). In Project -> Build Phases, under 'Link Binary with Libraries' there are two entries "Cocoa.Framework" and "Growl.Framework". Both listed as 'Required'.  Under 'Copy Bundle Resources' there are 8 items, one of which is "Growl.Framework ...in MyApp/Frameworks".

Problem #1:

When I build the app and attempt to run, it crashes with this:

dyld: Library not loaded: @executable_path/../Frameworks/Growl.framework/Versions/A/Growl Referenced from: 
 /Users/drmac/Library/Developer/Xcode/DerivedData/MyApp-bhqduygklqrkkveqhhghxunyahsp/Build/Products/Debug/MyApp.app/Contents/MacOS/MyApp
Reason: image not found


So why isn't it A) being copied to the correct destination and B) not being loaded?

So I manually created a Frameworks directory in Contents and moved Growl.framework there and the app runs. I shouldn't have to do that. I must be missing a setting that says to copy the framework.

A Framework isn't a Resource, so it doesn't belong in the Copy Resources build phase. You'll want to create a Copy Files build phase, and point it at the Frameworks directory, and put the Growl.framework there.
 

Problem #2: 
I have no need for callbacks. So, according to the documentation, I just have to do this:

[GrowlApplicationBridge setGrowlDelegate:@""];

That produces a compiler warning: Sending 'NSString *' to parameter of incompatible type 'id<GrowlApplicationBridgeDelegate>'
What's the best way to handle this? Is setting to nil OK? Seems to be so far in my testing.

it looks like setting nil is ok here.
 

Problem #3:
Last one. If I do all the above, and properly name the .plist to "Growl Registration Ticket.growlRegDict", when the app runs, I get about 100 lines of this in console:

2014-02-12 12:59:57.135 GuildMonitor[60454:303] Failed to notify due to missing registration, queue and reregister

would need to see the contents of that file to know what's wrong, since you don't specify a delegate or implement any of the optional methods it uses to figure out what information to send growl its relying entirely on what's in that file.

-rudy 
Reply all
Reply to author
Forward
0 new messages