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 UnitTesti
At this point, I've never had to import MyTarget
to get unit tests to work in Swift.
Common Solutions
$(SRCROOT)
to reference your bridging header path, ensure it is being evaluated to correct path..xcodeproj
with the one of your working project and match any relevant values that might be different.The bridging header system isn't perfect, but here are a few issues I've run into.