1
votes

So,this is the error,I record my UI script done,but the error occurred when I replayed the UI script.the console show :

"dyld: Library not loaded: @rpath/XCTest.framework/XCTest Referenced from: /var/containers/Bundle/Application/6D093D58-4246-40F6-A1E5-9B51018453E5/UITest7UITests-Runner.app/XCTRunner Reason: no suitable image found. Did find: /private/var/containers/Bundle/Application/6D093D58-4246-40F6-A1E5-9B51018453E5/UITest7UITests-Runner.app/Frameworks/XCTest.framework/XCTest: code signing blocked mmap() of '/private/var/containers/Bundle/Application/6D093D58-4246-40F6-A1E5-9B51018453E5/UITest7UITests-Runner.app/Frameworks/XCTest.framework/XCTest' /private/var/containers/Bundle/Application/6D093D58-4246-40F6-A1E5-9B51018453E5/UITest7UITests-Runner.app/Frameworks/XCTest.framework/XCTest: code signing blocked mmap() of '/private/var/containers/Bundle/Application/6D093D58-4246-40F6-A1E5-9B51018453E5/UITest7UITests-Runner.app/Frameworks/XCTest.framework/XCTest'"

There is a same question:Xcode 6.1 dyld: Library not loaded: @rpath/XCTest.framework/XCTest error; but my error can not be solved,and the message showed:

"ld: framework not found XCTest clang: error: linker command failed with exit code 1 (use -v to see invocation)" But in this path he tolded I really can be found the framework named XCTest.framework

enter image description here

So what can I do,thanks very much!

2
any solution? i have same errorAvinash Vaghasiya
@AvinashVaghasiya Were you able to solve this error?iSeeker

2 Answers

2
votes

If you used Cocoapods, i guess you add some Unit Test framework that includes XCTest as a dependency at podfile.

But this framework can only add to TestTarget. which like this:

target 'MyProjectTargetTest' do
   pod 'Kiwi'  
end
0
votes

Try change Requared to Optional. Its help to me.