I have an app target which includes a mix of Objective-C and Swift code. The Swift code uses Objective-C code and vice versa.
The app target is compiling fine, but when I try and compile my test target, it can’t find the “Objective-C Generated Interface Header”. Although the app target compiles fine, when it comes to compiling the app source code in the test target, the #import “MyApp-Swift.h” file results in a “file not found” error from the compiler.
If I check in the DerivedData folder, I can see the MyApp-Swift.h file inside the DerivedSources
folder for the app MyApp.build
folder, but not for Tests.build
(which has no DerivedSources
folder).
Does anyone know how to resolve this issue please?
@testable import MyApp
in your test file? – NSDmitry