now in swift 4 you just have to import a briding header into Test target and reference objc-class .h files there...using @testable import nameOfYourApp should work
In Swift there's a message in "Test Target" that states that the bridging header will be removed in newer versions of swift. I'm using mixed objc and swift clasess, but the UnitTest class is a swift file. Using @testable key was there in code
@testable import YourProject
You fix it by adding in your Test area the bridging header with objc headers that your test will use:
#import "Project-Bridging-Header.h"
and deleting the @testable inside your test
import YourProject
My Scenario: App contains mixed code (objC/Swift), UnitTest class is a swift file.
I import the "App-Bridging-Header.h" in my TestTarget Bridging Header (ObjC) and in my TestClass I remove the "@testable" so it looks like "import App". Then the Warning disappear and all seems to work well.
Source: Comments on the bug ticket: https://bugs.swift.org/browse/SR-3801