I read the article here... https://developer.apple.com/documentation/swift/imported_c_and_objective-c_apis/importing_swift_into_objective-c
and this is what I did.
- Created a header file for swift file.
- added @class SwiftFile.h
- #import MyAppTargetName-Swift.h in the objc file from where I want to reference my swift code.
Now in my swift file when I write...
@interface ClassName
{
MySwiftClass *swiftClass;
}
I get error message Unknown Type Name "MySwiftClass".
How can I resolve this and get going?
Am I doing something wrong?
Does the bridging header i created along with the swift file need to me edited?
Neerav