sliver
sliver

Reputation: 1660

Unit Testing iPhone - Linker Errors

I've followed the Unit Testing Applications guide from the iPhone Development documentation. I followed all the steps and it worked with the TestCase from the documentation. But as soon as I changed the TestCase to test real Code from my project I ended up with linker errors. All classes that are used in the TestCase are reported as missing.

I've already searched the internet and found that the Bundle Loader property must be set to "$(BUILT_PRODUCTS_DIR)/MyApplication.app/Contents/MacOS/MyApplication". But this also fails because the file could not be found.

Any ideas what I have to do to tell the linker where to search for the missing files?

Upvotes: 3

Views: 334

Answers (1)

kharrison
kharrison

Reputation: 3432

Make sure that you have added your classes to the unit test target. So if you are creating a unit test for class foo right click on foo.m, select info and then from the Targets tab ensure the checkbox for your unit test target is selected.

Upvotes: 1

Related Questions