I can't reference SomeSwiftProtocol
from my Objective-C header files.
Do you know how can it be done?
My protocol is defined like this:
@objc protocol SomeSwiftProtocol : class {
func someFunc()
}
It is well defined (not like here) because I can use it from .m
files by importing the Swift bridging header:
#import "MyProject-Swift.h"
But that import is not found when I put it in .h
files.
For example, this is SomeClass.h
:
// This import is not found...
#import "MyProject-Swift.h"
// ...so the protocol is not found
@interface SomeClass : UIView<SomeSwiftProtocol>
@end