Xcode 5.0.2 dyld: Library not loaded: @rpath/XCTest.framework/Versions/A/XCTest

user637338 picture user637338 · Dec 2, 2013 · Viewed 29.1k times · Source

I have problems running a project in Xcode 5.0.2

I get the following error:

dyld: Library not loaded: @rpath/XCTest.framework/Versions/A/XCTest
  Referenced from: /Users/chris/Library/Developer/Xcode/DerivedData/relatio-cwlmozvklaldmictbbjthzuoxnxz/Build/Products/Debug/relatio.app/Contents/MacOS/relatio

Reason: image not found (lldb)

How do I solve this issue?

Answer

Robert Wagstaff picture Robert Wagstaff · Aug 11, 2014

It looks like your main target is linking to XCTest.framework as well as your test target. It should only be linked to the main target.

1) Go to Project settings

2) Go to your apps main target -> other linker flags

3) remove '-framework XCTest'

4) make sure the 'other linker flags' field for your test target still contains '-framework XCTest'