pendowski / SwiftPluginsExample

39 stars 4 forks source link

Using PureSwift #1

Open Prince2k3 opened 7 years ago

Prince2k3 commented 7 years ago

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!

tkrajacic commented 6 years ago

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

lechuckcaptain commented 5 years ago

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