I created a Swift project and imported Objective-C files. During import, Xcode asked me to create a bridge header and create a header.
Now in the Objective-C files of the same project, I want to use the Swift class methods. I googled about importing Swift code in an Objective-C file. I found that we need to import ProjectName-Swift.hinto an Objective-C file. My questions are as follows:
- ProjectName-Swift.h is not created by Xcode. How to create this file?
- After creating the ProjectName-Swift.h file, how to use the Swift file methods in Objective-C files?
source
share