In my case this was actually an error as a result of a circular reference. I had a class imported in the bridging header, and that class' header file was importing the swift header (<MODULE_NAME>-Swift.h
). I was doing this because in the Obj-C header file I needed to use a class that was declared in Swift, the solution was to simply use the @class
declarative.
So basically the error said "Failed to import bridging header", the error above it said <MODULE_NAME>-Swift.h
file not found, above that was an error pointing at a specific Obj-C Header file (namely a View Controller).
Inspecting this file I noticed that it had the -Swift.h declared inside the header. Moving this import to the implementation resolved the issue. So I needed to use an object, lets call it MyObject
defined in Swift, so I simply changed the header to say
@class MyObject;