kmm-ios-interop

Bridge Kotlin Multiplatform Flow and StateFlow to Swift AsyncSequence for iOS.

1|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/dimitriRemoiville/cc-mobile --skill kmm-ios-interop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kmm-ios-interop
Source: https://github.com/dimitriRemoiville/cc-mobile/tree/main/kmm/.claude/skills/kmm-ios-interop
Command: npx skills add https://github.com/dimitriRemoiville/cc-mobile --skill kmm-ios-interop

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Bridges Kotlin Multiplatform code to Swift for iOS by exposing ergonomic public APIs and bridging Kotlin types to Swift-friendly equivalents for seamless consumption in iOS apps.

Core Features & Use Cases

  • Swift-friendly API surfaces for Kotlin Multiplatform shared modules.
  • Bridging Flow and StateFlow to Swift AsyncSequence and SwiftUI integrations.
  • Guidance to avoid inline functions and default args in public APIs, and to design public wrappers for a pleasant iOS developer experience.
  • Use Case: iOS apps consuming a shared KMM module with clean API boundaries and robust error handling.

Quick Start

Review the shared Kotlin module and implement Swift-friendly API wrappers and Flow bridging patterns.

Frequently Asked Questions about kmm-ios-interop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bridge Kotlin Flow to Swift for SwiftUI integration?

Kotlin Multiplatform bridging to Swift requires avoiding inline functions and default arguments in public APIs, minimizing deep generic sealed hierarchies, and annotating suspend functions with @Throws to expose ergonomic and Swift-friendly interfaces.

Why does my Kotlin Multiplatform code fail to expose default arguments to Swift?

Kotlin default arguments are not supported in Swift interop, so you must design public API wrappers without default arguments to provide a clean and functional iOS developer experience when consuming shared KMM modules.

Do I need to annotate suspend functions with @Throws for iOS consumption?

Yes, annotating suspend functions with @Throws is required for Kotlin Multiplatform Swift interop to properly propagate exceptions to Swift, ensuring robust error handling when iOS apps consume shared modules.

What's the best way to design Swift-friendly public APIs for a KMM module?

The best way to design Swift-friendly public APIs for a KMM module is to minimize deep generic sealed hierarchies, avoid Kotlin inline functions, and provide bridging helpers for Flow and StateFlow consumption.

Can I use Kotlin Multiplatform with iOS apps without writing custom bridging helpers?

Consuming a shared KMM module in iOS apps without custom bridging helpers results in non-ergonomic APIs, because Kotlin types require bridging to Swift-friendly equivalents to avoid inline functions and handle Flow integrations properly.