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
I'm unclear on the context here. If you're using
@testable import YourProject
(which I am) then it looks like it's in a swift file. In which case adding#import "Project-Bridging-Header.h"
will lead to a syntax error since it's not valid swift. Also, as @hlung and @alper mentioned, you lose access to classes in the application module when you remove @testable. At least, like them, that's what I'm seeing.