Hey folks, is there a way to interop with a cocoapods swift dependency from kotlin/native in a multiplatform project?
j
Jonas Bark
09/02/2019, 6:55 AM
only ObjC pods unfortunately
👍 1
Jonas Bark
09/02/2019, 6:55 AM
you could build a wrapper around the swift classes in ObjC
t
Tobi
09/02/2019, 7:12 AM
Yep, that would be an option. Is that sth. on the roadmap for kotlin/native?
s
Sam
09/02/2019, 7:06 PM
The wrapping would need to be done in Swift and the Swift classes have @objc annotations on them. Any method parameters that only swift understands such as swift enums will also need to be wrapped and translated by the wrapping layer.
👍 1
j
Jeremy
09/27/2019, 3:29 PM
If you don't want to touch ObjC you could expose an interface from Kotlin and implement interface wrapper in Swift
👍 1
Jeremy
09/27/2019, 3:30 PM
That is a pattern I've been using to avoid writing iOS code in Kotlin