2

I have added an iMessage extension as a target in my current app & I am trying to add unit tests for iMessage extension I tried adding the test cases for the iMessage extension but getting an error

Undefined symbols for architecture x86_64: "type metadata accessor for Target.ViewController", referenced from: TargetTest.ViewControllerTests.setUp () -> () in ViewControllerTests.o type metadata accessor for Target.ViewController? in ViewControllerTests.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

My Observation: On adding iMessage Extension target, Apple does not give option to add unit test cases for that extension, neither I can select the iMessage target while adding unit test target manually.

Has anyone added unit test cases in iMessage extension or know how to resolve this error in this situation.

iYoung
  • 3,596
  • 3
  • 32
  • 59
  • provide your code.. – Sagar Bhut Mar 22 '17 at 14:06
  • @SagarBhut What code do you want? – iYoung Mar 22 '17 at 14:06
  • I've not tried to do this personally so I'm not sure that it's possible. But maybe look to extract your code into a framework and test the code in the framework, then the code in the message extension can be minimal and you can reuse the code elsewhere at a later date. Please bare in mind that I'm only suggesting this as I've not got any experience with creating a message app extension so don't know the true solution to this. – dlbuckley Mar 22 '17 at 16:35

0 Answers0