109

I am receiving an error message when I try to use Xcode 8's Convert Wizard. After trying install KIF Framework.

Here is the error message:

Could not find test host for PresentrTests: TEST_HOST evaluates to "/Users/mymacbook/Library/Developer/Xcode/DerivedData/MyApplication-akrziiobrmqfliboqlgonjeyvquu/Build/Products/Debug-iphoneos/MyApplication.xctest/MyApplication"

Cœur
  • 37,241
  • 25
  • 195
  • 267
Irwan Madness
  • 1,236
  • 2
  • 13
  • 19

1 Answers1

329
  1. Select the Xcode project in the lefthand browser.
  2. Click on your test target in the Project's General tab.
  3. Under "General" select your appropriate host application under "Testing".
spfursich
  • 5,045
  • 3
  • 21
  • 24
  • 3
    Do you have an idea as to how the project got into the state where the target was not properly selected? – Stefan Vasiljevic Mar 05 '18 at 18:35
  • 16
    @Stefan Did you rename your project recently? – Sam Oct 02 '18 at 14:55
  • 1
    @Sam honestly, I do not remember, but I do not think I did. – Stefan Vasiljevic Feb 06 '19 at 23:18
  • 6
    If you rename your project name then follow these steps: 1. follow @spfursich first 3 steps which was helpful for me (thnx @spfursich) 2. Select Test target 3. Select Build Setting 4. Search Product Name 5. Rename to your 6. Go to your test.swift file 7. edit this line: testable import – Bevan Mar 09 '19 at 17:18
  • @spfursich what about latest Xcode? That option is still there under General in Target but Xcode defaults with nothing selected and my only option is "None" – Turnipdabeets Apr 05 '21 at 22:38
  • Click your Target on the top of Xcode near the Stop button and choose Edit Scheme, then ensure your target has the Test checkbox selected. – spfursich Apr 07 '21 at 17:44
  • 1
    Hello @spfursich, i am facing the issue with a project that has multiple targets, and when following ur solution, I cant find Testing under general. I can see it under the target but not when selecting any of the targets, but only when selecting the test target. Any idea – Mahmoud Zinji Feb 14 '22 at 07:57