I'm trying to call a Swift function from an Objective-C class and it's throwing:
No visible @interface for 'TUtils' declares the selector 'run'
TUtils.swift
@objc
public class TUtils: NSObject {
@objc func run() {
print("Hello test")
}
}
Consume.m
#import <RKit/RKit-Swift.h>
inline int tempFun () {
TUtils *obj = [TUtils new];
[obj run];
return 0;
}
thanks