Linker error when accessing application module in UI tests in Xcode 7.1
问题 I'm trying to implement some UI tests in my project. Everything goes fine as long as I keep it simple: record the test case, add some asserts, then run the test. This works fine, however when I try to access the application module from inside my test, the linker throws an error (See below): In the application source file: func foo() { assert(true) } In the UI tests: import XCTest @testable import MyApp func testExample() { foo() } Error: Undefined symbols for architecture i386: "MyApp.foo ()