To import a set of Objective-C files in the same framework target as your Swift code, you’ll need to import those files into the Objective-C umbrella header for the framework.
- Under Build Settings, in Packaging, make sure the Defines Module setting for that framework target is set to “Yes”.
- In your umbrella header file (
FrameworkName.h
), import every Objective-C header you want to expose to Swift. For example:
#import <XYZ/XYZCustomCell.h>
#import <XYZ/XYZCustomView.h>
#import <XYZ/XYZCustomViewController.h>