I have an Xcode Workspace
which builds a framework project
The Framework1
project builds independently without any dependencies. And this framework is included to the Workspace
Another framework project Framework2
uses Framework1
as dependency and builds.
Now, If i run tests from Framework2
project it gives below error
> 2017-06-23 15:44:17.029 xctest[1884:32036] The bundle
> “Framework2Tests” couldn’t be loaded because it is damaged or missing
> necessary resources. Try reinstalling the bundle. 2017-06-23
> 15:44:17.029 xctest[1884:32036]
> (dlopen_preflight(/Users/ME/Library/Developer/Xcode/DerivedData/Linker-bhbtuyxcsiwybtheoopvbaexcyfr/Build/Products/Debug-iphonesimulator/Framework2Tests.xctest/Framework2Tests):
> Library not loaded: @rpath/Framwork1.framework/Framwork1 Referenced
> from:
> /Users/ME/Library/Developer/Xcode/DerivedData/Linker-bhbtuyxcsiwybtheoopvbaexcyfr/Build/Products/Debug-iphonesimulator/Framework2.framework/Framework2
> Reason: image not found)
> Program ended with exit code: 82
Sample Project - https://github.com/nanjundas/LinkerError
Can any one help me here ??
Are you doing the test on simulator or device?
Currently, Xcode supports logic test and application test. if you are testing a framework and have not chosen a Host Application in the General page of the test target, it will be a logic test(which means it will run itself without launch a host application).
I think you can try to add the framework1 in the link list of the Build Phases page of test target. Hope this will help you.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.