Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCTest build errors for test target Xcode 5:

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?

like image 220
user798719 Avatar asked Aug 16 '13 05:08

user798719


People also ask

What is XCTest in Xcode?

Overview. Use the XCTest framework to write unit tests for your Xcode projects that integrate seamlessly with Xcode's testing workflow. Tests assert that certain conditions are satisfied during code execution, and record test failures (with optional messages) if those conditions aren't satisfied.


1 Answers

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

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

like image 161
HatAndBeard Avatar answered Sep 21 '22 16:09

HatAndBeard