iPhone通用静态库在Release配置中的Interface Builder中工作,但在Debug中不工作

时间:2010-07-20 14:27:14

标签: iphone objective-c xcode interface-builder

我按照here的说明创建了一个iPhone类库的静态库。我在发布模式下构建它。当我将它包含在另一个项目中时,引用Interface Builder中的一个类并在模拟器中运行它,如果我在调试模式下运行但是它在发布模式下工作,我会收到错误。

使用Debug配置我收到以下错误:

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: '[<UIViewController 0x3b07a40> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key delegate.'

理想情况下,当主机应用程序的构建配置同时处于Debug和Release配置时,我希望能够使用库的Release配置。

1 个答案:

答案 0 :(得分:2)

我发现了问题。

我在构建配置的“其他链接器标志”部分设置了-ObjC,但无意中仅将其设置为Release配置,而不是“All Configurations”。