including growl support (for dummies)
Posted: Wed Mar 29, 2006 5:56 pm
I'm trying to add growl support into my cocoa app and there is obviously something I am not doing and which is not explicitely stated in the docs.
I download the framework and add it to my cocoa project in xcode.
I add the copy files build phase and add the framework to that.
I pop in the framework loading code:
//load Growl framework
NSBundle *myBundle = [NSBundle bundleForClass:[self class]];
NSString *growlPath = [[myBundle privateFrameworksPath]
stringByAppendingPathComponent:@"Growl.framework"];
NSBundle *growlBundle = [NSBundle bundleWithPath:growlPath];
if (growlBundle && [growlBundle load]) {
// Register ourselves as a Growl delegate
[GrowlApplicationBridge setGrowlDelegate:self];
} else {
NSLog(@"Could not load Growl.framework");
}
I implement - (NSDictionary *) registrationDictionaryForGrowl;
I build the app and get the build errors that GrowlApplicationBridge is not declared. Not having a great deal of experience with custom frameworks - what else do I have to do to make my app aware of the new headers in the framework?
-ecume
I download the framework and add it to my cocoa project in xcode.
I add the copy files build phase and add the framework to that.
I pop in the framework loading code:
//load Growl framework
NSBundle *myBundle = [NSBundle bundleForClass:[self class]];
NSString *growlPath = [[myBundle privateFrameworksPath]
stringByAppendingPathComponent:@"Growl.framework"];
NSBundle *growlBundle = [NSBundle bundleWithPath:growlPath];
if (growlBundle && [growlBundle load]) {
// Register ourselves as a Growl delegate
[GrowlApplicationBridge setGrowlDelegate:self];
} else {
NSLog(@"Could not load Growl.framework");
}
I implement - (NSDictionary *) registrationDictionaryForGrowl;
I build the app and get the build errors that GrowlApplicationBridge is not declared. Not having a great deal of experience with custom frameworks - what else do I have to do to make my app aware of the new headers in the framework?
-ecume