Quick question about the new "Swift Code Bundling"...
# touchlab-tools
c
Quick question about the new "Swift Code Bundling" in SKIE. Am I right in thinking that the Swift code can call Kotlin APIs, but the Kotlin code can't directly call the Swift code? I had the vague idea of seeing whether I could use this as a way to bundle iOS specific implementations of interfaces (i.e.
IosConnectivityObserver
). Currently we export an interface to Swift, and lazily bind an Swift implementation into the DI graph. I was hoping to get rid of the round trip, but it doesn't seem to work.
f
This feature doesn’t change the way Kotlin and Swift code can interact. Meaning you still cannot call Swift code from Kotlin. However, I think you should be able to use the @objc interop annotations in Swift and write external declarations for them in Kotlin
c
Yeah, it makes total sense after I wrote it out. The feature is literally just copying/bundling the Swift into the resulting bundle. I'll give it a try, thanks!