Reputation: 425
I setup the project by Xcode 8.2.1. I upgrade to Xcode 8.3.2. I can run the project and no error. But when I run the unit test to test my app , I got this problem:
I have tried some ways to solve it. For example: clean the Test host
Or remove the derivedData and clean the app. All of them weren't work for me. I don't known the reason why I got this error. Does anyone can help me? Thanks
Upvotes: 7
Views: 2631
Reputation: 164
That happened to me too a couple of times after removing a pod.
I just clean the project (Product --> Clean (Build Folder)) and when rebuilding, the error message is gone.
Upvotes: 0
Reputation: 7219
If you are here because it seems that you can't see more details about this error, right click and select 'Reveal in Log'.
Upvotes: 0
Reputation: 36612
I just ran into the most unhelpful error ever while adding unit tests to an Xcode project.
The issue was that the Podfile was not updated to include a test target. I fixed it with the following steps:
First, get the name of your test target.
Next, update your Podfile with this:
target '<YOUR_PROJECT>Tests' do
inherit! :search_paths
# Any pods that may be needed for testing
end
Then, run pod install
.
After that, I was able to build & run tests.
Your mileage may vary...
Upvotes: 1
Reputation: 1479
The Host Application on my Test Target was set to None
for me the error was resolved when I set that to my Project Target
You can set that in this dropdown in the General
tab on your project Target:
Upvotes: 8