I wrote SearcherProtocol
in Swift and need to implement an Objective-C class FileSearcher
which has to use this protocol.
So I tried this:
I know this was a long time ago, but I just struggled with the same problem when adding a protocol to my Swift code, and it wasn't being added to the -Swift.h header file, hence "Cannot find protocol declaration"
The problem was my protocol wasn't marked as Public. I changed my protocol from this:
@objc protocol MyProtocol { //etc.... }
to this:
@objc public protocol MyProtocol { //etc.... }
I'm still not entirely sure why I need 'Public' but nobody else seems to, but hey it works...