使用测试目标归档项目时,Xcode Mach-o链接器错误 [英] Xcode mach-o linker error when archiving project with test targets

查看:49
本文介绍了使用测试目标归档项目时,Xcode Mach-o链接器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试创建档案时,我遇到了mach-o链接器错误,指向测试目标中的丢失文件,尽管如此,我仍可以在模拟器和设备上构建并运行我的应用,而不会出现任何问题.我尝试查看测试目标的捆绑程序加载器和测试主机配置,两者看起来都不错.还有什么可能导致这种情况?

I'm getting mach-o linker errors pointing to missing files in my test targets when I try to create an archive, I can build and run my app on both on the simulator and device without any problems though. I've tried looking at the bundle loader and test host configurations for the test targets, and both look fine. What else could cause this?

推荐答案

不是确切的解决方案,但我意识到我不希望或不需要我的单元测试在存档版本中运行.如果还有其他人遇到此问题,请尝试检查方案的构建设置,以确保在构建存档时未构建测试目标.选择方案->编辑方案->构建,然后取消选中存档作为测试目标.

Not the exact solution, but I realized that I don't want or need my unit tests to run during archived builds. If anyone else is having this problem try checking your scheme's build settings to make sure your test targets are not being built when you build for archiving. Select your scheme -> Edit Scheme -> Build and uncheck Archive for your test targets.

这篇关于使用测试目标归档项目时,Xcode Mach-o链接器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆