4

My project uses for both Objective C and Swift (primarily Objcective C).

Importing HomeViewController.h in a test class, HomeViewController imports MyProject-Swift.h to access the swift files.

The build fails whenever I run the tests. The main target is running fine.

enter image description here

1 Answers1

1

Make sure your .m file is a member of your test target. Click on .m file and click on file inspector to see it. If it's missing That will through an error. Also, compile sources of your test target should have all .m files (the one you are testing) in Build Phases. enter image description here

Ravi Prakash
  • 1,078
  • 1
  • 8
  • 14