针对测试目标Xcode 5的XCTest构建错误: [英] XCTest build errors for test target Xcode 5:

查看:106
本文介绍了针对测试目标Xcode 5的XCTest构建错误:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为单元测试设置了XCode 5 iOS 7项目.

I have set up an XCode 5 iOS 7 project for unit tests.

当然,设置单元测试花费了我很长时间,以至于我试图保持其值得的信念.在这个错误上苦苦挣扎几个小时:

Of course, setting up the unit tests are taking me so long that I'm trying to keep the faith that it's worth it. Struggling for hours over this error:

ld: building for iOS Simulator, but linking against dylib built for MacOSX file
'/Applications/Xcode5-DP5.app/Contents/Developer/Library/Frameworks/XCTest.framework/XCTest' 
for architecture i386

关于如何解决的任何想法?

Any ideas on how to solve?

推荐答案

在测试目标设置中检查框架搜索路径".添加XCTest Framework时,这些文件可能会损坏.

Check your Framework Search Paths in your test target settings. These can be corrupted when adding the XCTest Framework.

在我的一个项目中添加XCTest的路径前面加了一个"/",导致它们找不到正确的版本.

Adding XCTest to one of my projects prepended a "/" to the paths causing them to not find the correct version.

这篇关于针对测试目标Xcode 5的XCTest构建错误:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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