I wrote a spec for GitHub.com/AndrewSB/Library (see Array + LastOccouranceSpec.swift
), and tried to run the test using Product -> Test
I expected the test to run
My target built, but the test didn't run
List the software versions you're using:
Please also mention which package manager you used and its version. Delete the
other package managers in this list:
https://github.com/AndrewSB/Library
EDIT: video showing what happens when I try to test: https://vid.me/KdcA. Notice the debug bar show up on the bottom of the screen for a split second after the target builds
2016-12-02 08:47:33.060 xctest[25639:186633] The bundle “LibraryTests” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
2016-12-02 08:47:33.062 xctest[25639:186633] (dlopen_preflight(/Users/ikesyo/Library/Developer/Xcode/DerivedData/Library-bejyooymywutcmdzkzanrxprmkfe/Build/Products/Debug-iphonesimulator/LibraryTests.xctest/LibraryTests): Library not loaded: @rpath/Nimble.framework/Nimble
Referenced from: /Users/ikesyo/Library/Developer/Xcode/DerivedData/Library-bejyooymywutcmdzkzanrxprmkfe/Build/Products/Debug-iphonesimulator/LibraryTests.xctest/LibraryTests
Reason: image not found)
Program ended with exit code: 82
The test target crashes immediately. You are missing a step for the target: https://github.com/Carthage/Carthage#adding-frameworks-to-unit-tests-or-a-framework
In rare cases, you may want to also copy each dependency into the build product (e.g., to embed dependencies within the outer framework, or __make sure dependencies are present in a test bundle__). To do this, create a new “Copy Files” build phase with the “Frameworks” destination, then add the framework reference there as well.
Ahh, that makes complete sense. Thanks @ikesyo!
I should have pulled up the debugger view to see the log. Strange that it didn't stay there after the crash
@ikesyo Thank you for your answer. It helped me fix an issue with Apollo and GraphQL.
Most helpful comment
The test target crashes immediately. You are missing a step for the target: https://github.com/Carthage/Carthage#adding-frameworks-to-unit-tests-or-a-framework