iPhone universal static library works in Interface Builder in Release config but not in Debug
I followed the instructions here to create a static library of an iPhone class library. I built it in release mode. When I include it in another project, reference one of the classes in Interface Builder and run it in the simulator, I get an error if I run in Debug mode but it works in Release mode.
I get the following error using the Debug configuration:
2010-07-21 00:07:56.641 TestApp[13186:207] Unknown class BlahBlahController in Interface Builder file.
2010-07-21 00:07:56.651 TestApp[13186:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIV开发者_开发问答iewController 0x3b07a40> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key delegate.'
Ideally I'd like to be able to use the Release configuration of the library when the build configuration for the host app is in both Debug and Release configuration.
I found the problem.
I had set -ObjC
in the "Other Linker Flags" section of the build configuration, but inadvertently only set it for the Release config, rather than for "All Configurations".
精彩评论