Hi everyone! đź‘‹
I'm trying to integrate a native Swift SDK (Vapi) into my Kotlin Multiplatform project using Compose Multiplatform. The SDK is written in pure Swift and uses modern features like async/await and Combine.
Here's my current setup:
- Fresh KMP project created with the wizard
- Using Compose Multiplatform for UI
- Need to implement Vapi SDK natively in the iOS module
The main challenge is: How can I properly bridge this Swift SDK to make it accessible from my shared KMP code? I've seen some solutions mentioning creating a wrapper and using interfaces, but I'm not clear on the exact steps. Specifically:
1. Where exactly should I create the Swift wrapper file?
2. How do I make it visible to my Kotlin code?
3. What configuration changes are needed in build.gradle.kts or other project files?
Any guidance on the proper way to set this up would be greatly appreciated! 🙏