I have 2 projects.
The first project is a Cocoa Touch Static Library.
The other is a iPad application project.
In my library project i make a call to get a class and make an instance from it:
NSClassFromString(@"ClassName");
The only problem is, this will return nil.
In my main iPad application project, this will not return nil.
The class which it should load from the string is in the iPad project.
My explanation would be, the library cannot load the class, because it is not in it’s bundle.
Is this true?
How would i solve this problem, so the call in the library will not return nil?
Thanks
No, not true. At runtime there are no Libraries, no Projects, just your App, containing all (your) linked code, which is all in your executable.
You could be doing it before Classes have loaded, you could have spelt it wrong, you would have to show some code.