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
Ref
A solution that worked for me was changing your test target's inherit attribute in your Podfile from :search_paths
to :complete
.
Although this answer suggests that :search_paths
is designed for test environments.
target 'myapp' do
use_frameworks!
target 'myappTests' do
#inherit! :search_paths
inherit! :complete
end
end
I have same issue is because i add a new file into the framework. So just run "pod install
" solved my issue. But make sure your pod under Tests
target too.
Just for the ones that came up with the same issue:
Check on the lateral right menu which has to look like that:
And has not have to look like that:
In my main Target's "Link Binary With Libraries" (under Build Phases), it was the testing framework I was using (Nimble.framework) that was causing the problem. Removed it, and everything's fine!
The problem here is that, according to the dyld error message you posted, your application is linking against XCTest.framework. That's incorrect; only your test bundle needs to link against XCTest.framework since only your test bundle contains tests.
I had similar problem with OCMock library and solution is:
target :"Application Tests", :exclusive => true do
pod 'OCMock'
end