2

I have multiple projects in my workspace including a subproject to one of my projects.

So the folder structure is as such:

Workspace
|-- Pods Project
`-- Main Project
    |-- AppDelegate.h
    |-- AppDelegate.m
    |-- UnitTests
    |   |-- testAppDelegate.m
    |   `-- testSPClass.m
    `-- Sub Project
        |-- SPClass.h
        `-- SPClass.m

The sub project target is built as a static library.

The main project target has the sub project as a dependency. I have a test target in my main project that creates a coverage report based off of the classes contains in my main project but not my subproject.

Is there any way I can force the coverage report to include the sub projects classes?

(Xcode 5.1, iOSSimulator 7.1)

teddy777
  • 661
  • 8
  • 20

2 Answers2

1

So it was just a mistake in configuration. I didn't realise that my sub project settings to do with creating the coverage report had to mirror that of the main projects target.

So “Generate Test Coverage Files” and “Instrument Program Flow”, both set to yes in the sub project.

teddy777
  • 661
  • 8
  • 20
0

Was that subproject a Library? I get everything working in the super project but becasue the subproject is a Library I am always getting the same error:

Undefined symbols for architecture i386:
"_llvm_gcda_emit_arcs", referenced from:
Nicolas Yuste
  • 673
  • 9
  • 15
  • Yes so the sub project has a single target which is a static library. Unfortunately I'm unsure of why you're getting that error. A quick search on [SO](http://stackoverflow.com/questions/7949781/undefined-symbols-for-architecture-i386-upgrading-project-to-ios-5) seems to suggest that setting the things I did in my sub project should fix the problem. However I suppose you've already tried that seeing as though you've read my answer. Do the valid architectures build setting match up? – teddy777 Jul 28 '14 at 12:24
  • Yes, I did all what you said but it is still not working. I kind of gave up. I will came back later to that in a month I think. – Nicolas Yuste Aug 25 '14 at 16:49