Objective-C class can't import Swift class

559 Views Asked by At

I have two classes, (an obj-c, and a swift). I would like to call a function from swift class. I tried to import my swift class as the following shows:

#import <MyProjName-Swift.h>
#import <MyClassName-Swift.h>
#import <MyProjName/MyClassName-Swift.h>

But none of these worked.

Error: file not found

How could I import my Swift class into my Obj-C class?

Is there anywhere an existing open source project which uses Swift and Objective-C classes in one project?

0

There are 0 best solutions below