Do I include my unit tests in my Ad Hoc archive?

I am preparing a special version of our application for sending to UAT, and at the archive stage it does not succeed due to a linker problem when building 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 during archiving; if I usually run tests, everything builds and works fine, and the tests pass. I am a little worried that my unit tests are created at all when I make my archive.

UPDATE

By setting "Hidden Symbols By Default" to "false" for the Ad-Hoc build settings, I can avoid the linker problem. So now my question is, is the problem that unit tests are being built? Do I include my unit tests in my Ad Hoc archive?

+4
source share
1 answer

It is not a problem that your unit tests are built; this is standard and expected behavior. When you create an archive, a complete, clean assembly of all sources is created.

Unit tests are not included in the regular ad-hoc distribution.

+1
source

Source: https://habr.com/ru/post/1369644/


All Articles