Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't Xcode's error checking work for my test folder?

Any classes I put within my CallInTests folder no longer get checked for errors. Is there a way to change my settings or the file structure so I can have these files checked for errors?

Error-less Screenshot

My colleagues also have this issue so it isn't a local problem. These are scripts I use within the terminal so don't actually compile with the project but I've thrown them in so it's easy to update them on git.

I've tried deleting derived data, cleaning and rebuilding and restarting Xcode to no avail. For now I'm building the class in a playground then copy and pasting it in but I'd like a better solution.

like image 697
Declan McKenna Avatar asked Mar 30 '26 15:03

Declan McKenna


1 Answers

Are you building the test target while you are building the app?

You have to go to your scheme settings -> Build tab -> There should be the test target into the list

like image 64
Luca D'Alberti Avatar answered Apr 02 '26 12:04

Luca D'Alberti



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!