yong ho
yong ho

Reputation: 4042

How to use classes from another target for tests in XCTest

I use Xcode 6.1 to create a new project, and it comes with a Tests target. I am trying to use the classes defined in another demo target in the same project for tests. But how do I accomplish this (besides setting the class's target membership to both demo and tests targets)?

Upvotes: 7

Views: 2528

Answers (1)

Rob
Rob

Reputation: 437532

Go to the source file in question and press option+command+1 to see the file inspector, and then select the appropriate targets in the "Target membership" section. Or, go to the target setting, click on "Build Phases" tab and add it to the "Compile Sources" section.

Upvotes: 3

Related Questions