1

I am unable to access my app classes in xctest target. Getting "_OBJ_CLASS_$_MYClassName", reference from: objc-class-ref in TestsCase.m ld:Symbol(s) not found for acrtichecture i386. When I add .m file in test case build phase this error is removed but while running on test cases I am getting following warning - class is implemented in both. one of the two will be used. which is undefind xcode7 ios.

I have read many solution over stackoverflow saying to remove .m reference from test case target's build phase but if I do it, it gives me class reference error.

In this project I have added test case target later it was not exists earlier. Is this the reason that I need to do some build setting. I have tried all things which I found over stakoverflow nothing has solved my problem.

Everything is working fine if I create `new project' and try to access classes in the newely created project test case class.

user1101733
  • 258
  • 2
  • 14

1 Answers1

1

I just got the reason and happy to share. Since I was adding test case target into an existing project and Enable Testability' option was set to NO for debug mode in my project's build setting. I set it toYES` and it solved my problem :-) Reference - stakeoverflow.

user1101733
  • 258
  • 2
  • 14