2014-10-30 38 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

如果您复制您的目标并从链接的框架列表中删除框架,您可以使用这个新目标来构建模拟器。它少一点“只要知道我想要做什么”,但它肯定会解决你的问题,这种关系将被明确地标记出来。