I'm referencing another project's target static library. I successfully followed instructions from this site: http://tinyurl.com/cleuhw. Below is the project using a class named FileIO from the library. I create a FileIO object (fileObj) and assign a string to its name property. Then I get a __TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION__ on the assignment of name.. In applicationDidFinishLaunching I do this:
fileObj = [[FileIO alloc] init];
fileObj.name = @"test";
and this is in the .h file:
@class FileIO;
@interface Nav1AppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
UINavigationController *navigationController;
FileIO *fileObj;
}
In the library, FileIO is a simple class with name in it. I have also tried [fileObj setName:@"test"] but get the same results. Here's the stack trace:
2009-04-01 20:37:17.721 NavNew[81425:20b] *** -[FileIO setName:]: unrecognized selector sent to instance 0x5219b0
2009-04-01 20:37:17.723 NavNew[81425:20b] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[FileIO setName:]: unrecognized selector sent to instance 0x5219b0'
2009-04-01 20:37:17.724 NavNew[81425:20b] Stack: (
2454561035,
2461146683,
2454590218,
2454583564,
2454583762,
11275,
816111650,
816149355,
2455110190,
2454063909,
2454064344,
827745792,
827745989,
816114848,
816160924,
11128,
10982
) (gdb)
I have discovered this is a problem only with instance members (property or method). Static methods work fine. I also opened the library .a file in the hosting project. I don't see the instance property anywhere in it.
Any suggestions on what I'm doing wrong?