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
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:
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...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With