Resolving Swift.h and Bridging-Header.h circular references involving enums
问题 I have an Objective-C header that has to be used by a Swift class. However, this header has to use the Swift.h file for an enum declared in a Swift file. In other words, the setup is as follows: MPViewController.h #import "MyProject-Swift.h" @interface MPViewController: UIViewController @property (nonatomic, assign) MPSomeEnum theEnum; ... @end MyProject-Bridging-Header.h ... #import "MPViewController.h" ... SomeEnum.swift @objc enum MPSomeEnum: Int { ... } When compiling the code, I get