Level up Your SDKs With KMP - no rewrite required!
summary
PubNub builds a Kotlin Multiplatform wrapper that delegates to existing native SDKs so one codebase publishes Kotlin, Swift and JS APIs; iOS integration uses CocoaPods + ObjC wrapper because Swift-only headers don’t bridge, JS requires handwritten externals after ts -> Kotlin tooling failed, and JVM/iOS/JS runtime mismatches (Longs, regex) force platform-specific implementations. Builds slow without target pruning, coroutines blow up JS bundle, but a common test suite finds runtime bugs and the Swift API ships while JS is still stabilizing.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 1:30KMP state and SDK challenges
- 3:16KMP SDK goals and use cases
- 6:06PubNub project and KMP motivation
- 8:57KMP API architecture
- 11:27Kotlin Multiplatform setup
- 14:39Common API interface
- 16:03Moving code to common sets
- 18:56Platform-specific types handling
- 21:21Wrapping iOS SDK with CocoaPods
- 24:35JavaScript SDK integration
- 27:03JS config objects and type safety
- 29:56Kotlin.js type mapping
- 34:21Testing KMP across platforms
- 35:27Exporting native APIs
- 36:09Standard library limits
- 37:54JS dependencies and code size
- 38:58Optimizing native API output
- 39:38KMP tools and improvements
- 40:00Project outcomes
related talks
29mKMP for Mobile Developers
13mUniting Native SDKs into KMP
36mWriting Kotlin Multiplatform libraries that your iOS teammates are gonna love
37mKotlin Multiplatform Library Development
40mKMP with non-Kotlin languages
26mKotlin Multiplatform in an MVVM World
34mIntegrating Kotlin/JS in a Kotlin Multiplatform library
36mEntering the World of Other Platforms Through KMP Gate
