I try to integrate Swift
code in my app.My app is written in Objective-C
and I added a Swift
class. I\'ve done everything described he
Allow Xcode to do its work, do not add/create Swift header manually. Just add @objc before your Swift class ex.
@objc class YourSwiftClassName: UIViewController
In your project setting search for below flags and change it to YES (Both Project and Target)
Defines Module : YES
Always Embed Swift Standard Libraries : YES
Install Objective-C Compatibility Header : YES
Then clean the project and build once, after build succeed (it should probably) import below header file in your objective-c class .m file
#import "YourProjectName-Swift.h"
Boooom!