Reputation: 2114
I'm implementing some tests and I need to access the source files from my main target.
Do I need to add all required files in "Compile Sources" ?
Upvotes: 1
Views: 1285
Reputation: 23
You can also use @testable import ${app target name}
in your test file written in swift.
Upvotes: 0
Reputation: 27345
Yes you need to add them in "Compile Sources". Alternatively you can select file in "Project Navigator" and change target membership in "Utility -> File Inspector" pane on right side of Xcode window.
Upvotes: 1