kmp-ios

Integrate SwiftUI views with Kotlin Multiplatform ViewModels via SKIE bridging.

1|Updated Nov 26, 2025
One-click install
npx skills add https://github.com/niltsiar/kotlin_multiplatform_pokedex --skill kmp-ios
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kmp-ios
Source: https://github.com/niltsiar/kotlin_multiplatform_pokedex/tree/main/.agents/kmp-ios
Command: npx skills add https://github.com/niltsiar/kotlin_multiplatform_pokedex --skill kmp-ios

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Seamless iOS integration with Kotlin Multiplatform by enabling direct SwiftUI consumption of KMP ViewModels, bridging lifecycle, and wiring exports to keep the iOS app lean and maintainable.

Core Features & Use Cases

  • Direct Integration: Consume KMP ViewModels directly from SwiftUI with minimal boilerplate.
  • Lifecycle Bridging: Align SwiftUI view lifecycle with KMP lifecycle events for reliable data loading.
  • Framework Exports: Configure Shared exports to expose only the necessary APIs to iOS, preserving boundaries.
  • iOS Patterns: Includes SwiftUI patterns, Koin helpers, and troubleshooting guidance for iOS-KMP integration scenarios.

Quick Start

Use the kmp-ios skill to bootstrap a SwiftUI view that consumes a shared KMP ViewModel and bridges its lifecycle.

Frequently Asked Questions about kmp-ios

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

FAQPage Schema
How do I consume a Kotlin Multiplatform ViewModel directly in SwiftUI?

To consume a KMP ViewModel in SwiftUI, you integrate the shared module into your iOS production code using SKIE bridging and configure Gradle exports to safely expose only the necessary APIs.

How do I bridge SwiftUI lifecycle events with Kotlin Multiplatform?

Lifecycle bridging aligns SwiftUI view lifecycle events with KMP lifecycle events by implementing DefaultLifecycleObserver in your KMP ViewModel, ensuring reliable data loading and state synchronization.

Do I need SKIE to use KMP ViewModels in an iOS app?

Yes, SKIE bridging is required to enable direct integration of SwiftUI with KMP ViewModels and to consume shared business logic without manual boilerplate.

How do I configure Gradle exports to expose only presentation modules to iOS?

Configure framework exports in Gradle to expose only presentation modules and necessary APIs to the iosApp target, preserving module boundaries and keeping the iOS application lean.

What is the best way to troubleshoot KMP ViewModel integration issues in iOS?

Troubleshooting iOS-KMP integration involves checking SKIE bridging setups, verifying Gradle export configurations, and ensuring DefaultLifecycleObserver implementation aligns with SwiftUI view lifecycle.

Can I use Koin helpers with SwiftUI and KMP ViewModels?

Yes, using Koin helpers alongside SwiftUI patterns is supported for dependency injection when consuming KMP ViewModels directly in iOS production code.