“ProductModuleName-Swift.h” not exporting all Swift classes
问题 I have defined two Swift classes in my Xcode project. Everything else is Objective-C. To use the classes in Objective-C I'm trying to import ProductModuleName-Swift.h but the file contains only the definition for one of the Swift classes. ( SearchViewController ) This class is being exported: class SearchViewController : UIViewController { but this isn't: public class Socket { 回答1: From "Migrating Your Objective-C Code to Swift" in the "Using Swift with Cocoa and Objective-C" documentation: