I have some c++ files(with .mm extension) and some Swift files all in a project that is Objective-C.
I added bridging header in order to call Swift methods in the objective-C.
It is possible to make instance and use the c++ classes in Objective-C code. but I cannot use the C++ classes in the Swift Code.
// Graph.h
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface Graph : NSObject
- (id) init;
-(void) setIsProccessingFrame:(BOOL)flag;
@end
// Swift
@objc class VideoViewController:UIViewController {
var graph: graph = Graph() ---> //Use of undeclared type 'Graph'
}
Error: Use of undeclared type 'Graph'
I have another sample project that contains the Swift and .mm files. and these codes work there. I think that they cannot work here because the project is based on Objective-C.
I think that I need to import it but I don't know how to.