Question

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)

Was it helpful?

Solution

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.

OTHER TIPS

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:
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top