You might be getting this error because you renamed your project and Tests
cannot be found anymore. This is easy to fix:
Solve it in Xcode like this:
[Your project's Tests]
under targetsGeneral
tab change the Host Application
from the drop downThis problem happened to me because I renamed my project and the tests could't find it anymore.
The problem is that after renaming the product its Tests target is still looking for the previous app name.
Select your Tests target and then in Build Settings modify the TestHost values to correspond your new product name in the following way:
$(BUILT_PRODUCTS_DIR)/YourNewProductName.app/YourNewProductName
I had a similar problem -- it's because I was using Cocoapods and had opened the .xcodeproj file instead of the .xcworkspace file... doh!
I have solved it by renaming the product.
In the Application's target choose Build Settings.
Under the Packaging options, you have to rename your product to the name thats shown in the error.
It solved my problem and the code started compiling. My test cases are also executing.
Did you try cleaning up your derived data?
Xcode5->Organizer->Projects->Select your project->Delete the derived data.
Try to remove "Social_EventsTests" target.
Note: PuzzleGame is new name of my project(product name). RandomNumber is old name of my project(product name).
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