Some platform specific Apple APIs are only available as Swift modules. Lets take advantage of Cocoapods to integrate Swift code directly into our project and build a Multiplatform library with a pure Kotlin interface over the underlying platform specifics. We then take this further, and learn how to structure a Swift project to consume the published Kotlin library.
Key Takeaways and Learning Points:
- Integrating different languages in a single library is not as difficult as it seems
- Consuming Swift from Kotlin and vice-versa opens up a lots of cross platform code sharing
- Kotlin native interop is with Obj-C, this is a constraint not a blocker for Swift interop
- See details on how to setup Gradle tooling for a smooth workflow