2014-10-30 61 views
1

我在我的應用程序(metaioSDK)中使用了第三方框架,並且它沒有在i386版本中提供。我希望能夠從模擬器構建中排除它,以便我可以在模擬器上測試與此框架無關的功能。我跟着這個問題的答案:How to exclude frameworks in simulator builds in Xcode並確保包裝使用此框架的任何代碼#if/#else/#endif這樣的:從iOS模擬器中排除框架構建

// ARViewController.h 
#import <UIKit/UIKit.h> 
#if TARGET_IPHONE_SIMULATOR 
@interface ARViewController : UIViewController { 
} 
@end 

#else 

#import <metaioSDK/MetaioCloudPlugin/MetaioCloudPluginViewController.h> 

@interface ARViewController : MetaioCloudPluginViewController 
{ 
    bool m_useLocationAtStartup; 
} 
@end 

#endif 

同樣,上運行時,我已經改變了相關ARViewController.m文件有一個空白的實現模擬器。

然而,Xcode中似乎仍然希望將一些部分鏈接此框架,和我得到的錯誤:

Undefined symbols for architecture i386: 
    "_fopen$UNIX2003", referenced from: 
     _BIO_new_file in metaioSDK(bss_file.o) 
     _file_ctrl in metaioSDK(bss_file.o) 
     _open_console in metaioSDK(ui_openssl.o) 
    "_fputs$UNIX2003", referenced from: 
     _write_string in metaioSDK(ui_openssl.o) 
     _read_string in metaioSDK(ui_openssl.o) 
    "_fwrite$UNIX2003", referenced from: 
     _XrAQWOpNWyNOaebKZvBRbL in metaioSDK(pngwio.o) 
     _file_write in metaioSDK(bss_file.o) 
     _int_rsa_verify in metaioSDK(rsa_sign.o) 
     _send_fp_chars in metaioSDK(a_strex.o) 
     _write_fp in metaioSDK(b_dump.o) 
     _read_string in metaioSDK(ui_openssl.o) 
    "_nanosleep$UNIX2003", referenced from: 
     boost::this_thread::hiden::sleep_for(timespec const&) in metaioSDK(thread.o) 
     boost::this_thread::hiden::sleep_until(timespec const&) in metaioSDK(thread.o) 
    "_strerror$UNIX2003", referenced from: 
     _build_SYS_str_reasons in metaioSDK(err.o) 
    "_strtod$UNIX2003", referenced from: 
     _WWOVfTQLpCQpcac in metaioSDK(pngrutil.o) 
ld: symbol(s) not found for architecture i386 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

別的什麼我從紀念這一框架可選失蹤一邊?

+0

在相同的情況。任何解決方案尚未? – JordanC 2015-03-25 16:55:17

回答

3

問題是,您的第三方框架DOES包含i386版本,但該i386版本是針對錯誤的SDK構建的。它是針對OS X SDK構建的,應該是針對iOS Simulator SDK構建的。向metaioSDK開發人員提交一份錯誤報告,讓他們修復錯誤。

1

如果您複製您的目標並從鏈接的框架列表中刪除框架,您可以使用這個新目標來構建模擬器。它少一點「只要知道我想要做什麼」,但它肯定會解決你的問題,這種關係將被明確地標記出來。