我在我的應用程序(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)
別的什麼我從紀念這一框架可選失蹤一邊?
在相同的情況。任何解決方案尚未? – JordanC 2015-03-25 16:55:17