title: Call an Objective-C class from a Swift test file
body: <p>I'm working on implementing unit tests. The original project was written in Objective-C.</p>
  
  <p>I created a new Test Target that is written in Swift.</p>
  
  <p>How do I call an Objective-C class of the actual app in my test file?</p>
  
  <p>I've tried doing the following.</p>
  
  <pre><code>@testable import MyModule
  </code></pre>
  
  <p>However, this seems to only work if all the files are in Swift, which is not the case for me. </p>
  
  <p>I've tried several other things with the project settings however, none of these seemed to work. </p>
  
  <p>Am I missing something blatantly obvious?</p>
  
  <pre><code>class MyTests: XCTestCase {
  
      override func setUp() {
          super.setUp()
          // Put setup code here. This method is called before the invocation of each test method in the class.
      }
  
      override func tearDown() {
          // Put teardown code here. This method is called after the invocation of each test method in the class.
          super.tearDown()
      }
  
      func testExample() {
          let vc = HomeViewController() //this line is failing. How do I expose this view controller written in objective c?
          // This is an example of a functional test case.
          // Use XCTAssert and related functions to verify your tests produce the correct results.
      }
  }
  </code></pre>