My Question is similar to This SO question, but with the main difference being that I'm using class methods. Some code:
OpenFeint+private.h
@interface OpenFeint (Private)
// ...
+ (void) createSharedInstance;
OpenFeint+private.mm
+ (void) createSharedInstance
{
//...
}
OpenFeint.mm
+ (void) initializeWithProductKey:(NSString*)productKey
andSecret:(NSString*)productSecret
andDisplayName:(NSString*)displayName
andSettings:(NSDictionary*)settings
andDelegates:(OFDelegatesContainer*)delegatesContainer
{
[OpenFeint createSharedInstance];
// ...
MyApp.mm:
// ...
#import "OpenFeint.h"
// ...
[OpenFeint initializeWithProductKey: OF_PRODUCT_KEY
andSecret: OF_PRODUCT_SECRET
andDisplayName: OF_DISPLAY_NAME
andSettings: openFeintSettings
andDelegates: [OFDelegatesContainer containerWithOpenFeintDelegate: self]];
And the error is:
2010-07-22 11:30:15.239 MyApp[20210:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[OpenFeint createSharedInstance]: unrecognized selector sent to class 0x1cdb1c'
*** Call stack at first throw:
(
0 CoreFoundation 0x02d6f919 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x02ebd5de objc_exception_throw + 47
2 CoreFoundation 0x02d714eb +[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x02ce1116 ___forwarding___ + 966
4 CoreFoundation 0x02ce0cd2 _CF_forwarding_prep_0 + 50
5 MyApp 0x0002844d +[OpenFeint initializeWithProductKey:andSecret:andDisplayName:andSettings:andDelegates:] + 48
// ...
Everything compiles & links just fine, but I'm getting this goofy error.
One last thing -- All the OpenFeint stuff is is a static library and, yes, it compiled & linked as well. This is my first static library so I'm likely just missing some important step. Any clues?
Thanks!