2010-07-20 200 views
2

我按照指令here創建了一個iPhone類庫的靜態庫。我建立它在釋放模式。當我將它包含在另一個項目中時,引用Interface Builder中的一個類並在模擬器中運行它,如果我在Debug模式下運行但在Release模式下運行,則會出現錯誤。iPhone通用靜態庫在Release配置中的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和釋放配置。

回答

2

我發現了這個問題。

我在構建配置的「其他鏈接器標誌」部分設置了-ObjC,但無意中只將其設置爲發佈配置,而不是「所有配置」。

相關問題