Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No error highlighting in test bundle in XCode 7.2

In my test bundle in an Objective-C iOS app, errors are not highlighted automatically (things like missing semicolon etc). I have to run the tests and then check the build log when the build fails.

Is that normal or have I messed up the configuration? For the rest of the project, error highlighting works as expected.

like image 324
Daniel Hepper Avatar asked Feb 08 '23 12:02

Daniel Hepper


2 Answers

The solution was to add the Test Target to the Test action in the Scheme editor.

In XCode 7.2:

  1. Product > Scheme > Edit Scheme...
  2. Select Test on the left.
  3. If your test target is not listed under Tests on the right, click the plus sign on the button to add it.

I found this Stack Overflow answer after googling for test target instead of test bundle.

like image 65
Daniel Hepper Avatar answered Feb 19 '23 22:02

Daniel Hepper


I am not sure my way will work with you or not, I had faced the same scenario and I had run my code on Xcode 5.1.1 and It showing the error. or

And another reason that may be possible is you have dragged new library but not select target. I am attaching image please have a look

enter image description here

Please let me know If it's working.

like image 21
Abhishek Sharma Avatar answered Feb 19 '23 23:02

Abhishek Sharma