Take the 2-minute tour ×

I want to access a constant NSString that is defined in a framework in objective-c without statically linking to the framework. I'm working on a framework myself and I don't want to link against the other framework because I know that some clients of my framework won't support the new framework. I've found that I can dynamically load a framework using NSBundle and that I can dynamically create instances of the class by using NSClassFromString, but the compiler (actually I guess it's the linker) won't let me use constants because they are undefined symbols.

Edit: I have a suspicion that my answer is here: http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html

I found the answer here: How do I weak link frameworks on Xcode 4?

What happens then if I try and access something from the framework? Do I just get nil?

share|improve this question
add comment

Your Answer



Browse other questions tagged or ask your own question.