I added a new Test target to my Xcode project. My project has Swift code and Objective-C code, and has a bridging header. Upon either adding the bridging header to UnitTesting's build settings, or doing import MyTarget
, I'm getting the error:
failed to import bridging header
I've tried:
- Adding the bridging header to project, unit testing and main target's build settings.
- Changing
defines modules
to Yes
.
- Moving the bridging header file to the root folder.
I've also tried making a sample project, which built and worked fine. Taking everything I have over into a clean new project isn't an option at this point.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…