gpt4 book ai didi

ios - 从iOS Simulator构建中排除框架

转载 作者:行者123 更新时间:2023-12-01 15:59:54 26 4
gpt4 key购买 nike

我在我的应用程序(metaioSDK)中使用了第三方框架,但i386版本未提供该框架。我希望能够将其从模拟器构建中排除,以便我可以在模拟器上测试与此框架无关的功能。我遵循了这个问题的答案:How to exclude frameworks in simulator builds in Xcode,并确保将使用此框架的所有代码包装在#if/#else/#endif中,如下所示:

// 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)

除了将此框架标记为可选框架之外,我还缺少什么?

最佳答案

问题是您的第三方框架确实包含i386版本,但是该i386版本是针对错误的SDK构建的。它是根据OS X SDK构建的,应该已经针对iOS Simulator SDK构建的。向metaioSDK开发人员提交错误报告,以帮助他们修复错误。

关于ios - 从iOS Simulator构建中排除框架,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26655924/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com