Question

I'm preparing an ad-hoc release of our app to send off for UAT, and the Archive step is failing because of a linker problem while building my unit tests:

Undefined symbols for architecture armv7: "_OBJC_CLASS_$_Category", 
referenced from: objc-class-ref in Unit_Tests.o
Undefined symbols for architecture armv6: "_OBJC_CLASS_$_Category", 
referenced from: objc-class-ref in Unit_Tests.o

This only happens while archiving; if I run the tests normally, everything builds and runs fine, and the tests pass. I'm a bit concerned that my unit tests are being built at all when I'm making my archive.

UPDATE

By setting 'Symbols hidden by default' to false for the Ad-Hoc build settings, I can avoid the linker problem. So my question is now - is it a problem that the unit tests are being built? Am I including my unit tests in my Ad Hoc archive?

Was it helpful?

Solution

It is not a problem that your unit tests are being built; this is standard and expected behaviour. When you create an archive, a full, clean build of all of the sources is created.

The unit tests are not included in a normal ad-hoc .iap distribution.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top