SwiftPluginsExample icon indicating copy to clipboard operation
SwiftPluginsExample copied to clipboard

Using PureSwift

Open Prince2k3 opened this issue 9 years ago • 2 comments

I was able to get your code working with the current Swift 3. By doing this ...

@objc(PluginInterface)
protocol PluginInterface: NSObjectProtocol {
    var name: String { get }
    
    @objc(convertString:)
    func convert(_ string: String?) -> String?
}

objc does work!! Granted this took me a bit to see what was missing. :)

Enjoy!

Prince2k3 avatar Dec 23 '16 18:12 Prince2k3

It still sucks that we can't pass any Swift types through the interface that are not compatible with Objective-C

tkrajacic avatar Apr 13 '18 10:04 tkrajacic

I just created an example using only PureSwift, still have some room of improvements but the proof of concept per-se is working. Any feedback si welcome!

https://github.com/lechuckcaptain/SwiftPluginArchitectureExample

lechuckcaptain avatar Sep 26 '19 07:09 lechuckcaptain