I'm trying to call an Objective-C class from Swift. So I enabled the bridging header option
Created the following files:
MyTest.h:
#import <Foundation/Foundation.h>
@interface MyTest : NSObject
+(void)sayHello;
@end
MyTest.m
@implementation MyTest
+(void)sayHello {
NSLog(@"Hello");
}
@end
at MyProject-Bridging-Header.h
added:
#import "MyTest.h"
Then when in a Swift file I call:
let test = MyTest()
test.sayHello()
The compiler complains in the second line:
MyTest does not have a member named 'sayHello'
What am I doing wrong?
Note: I have no experience with Objective-C.