Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Kotlin Multiplatform + iOS アーキテクチャの実践
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Nao
February 19, 2026
Programming
170
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Kotlin Multiplatform + iOS アーキテクチャの実践
Nao
February 19, 2026
Other Decks in Programming
See All in Programming
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
530
関数型プログラミングのメリットって何だろう?
wanko_it
0
190
Claude Team Plan導入・ガイド
tk3fftk
0
240
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
330
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
300
Android CLI
fornewid
0
170
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
210
5分で問診!Composer セキュリティ健康診断
codmoninc
0
600
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
500
SLOをサービス品質の共通言語にするために 取り組んできたこと
wakana0222
0
550
霧の中の代数的エフェクト
funnyycat
1
430
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
180
Featured
See All Featured
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.5k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Building the Perfect Custom Keyboard
takai
2
820
Music & Morning Musume
bryan
47
7.3k
Abbi's Birthday
coloredviolet
3
8.8k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
460
How to Ace a Technical Interview
jacobian
281
24k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
910
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
410
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Transcript
Kotlin Multiplatform + iOS アーキテクチャの実践 1
自己紹介 PROFILE 名前: 権 奈悟 所属: ディップ株式会社 担当: モバイル開発(iOS /
KMP ) ABOUT ハマっているもの: ドバイチョコ餅クッキー(두쫀쿠/ ドゥチ ョンク) 2
会社概要 3
ここから技術パート KMP の実運用での使い分けを共有します。 4
今日話すこと / 話さないこと 話すこと KMP 全体アーキテクチャ iOS アーキテクチャ KMP 連携(SKIE
/ XCFramework ) 話さないこと コードの細かい実装テクニック 画面ごとの仕様説明 KMP 導入手順の完全ガイド 5
導入 CONTEXT バイトル(15 年以上) → 長期運用でレガシー蓄積 → 大規模リアーキを実施 従来: Android
/ iOS 個別ネイティブ開発 → 方針: 工数削減とネイティブ体験の両立 → 採用: ビジネスロジックをKMP 共有、UI は各OS ネイティブ 6
KMP 全体アーキテクチャ Presentation は各OS ネイティブ実装(Android / iOS ) shared で
Domain / Data をKMP 共有 model はPure Domain Model (インフラ依存ゼロ) 7
データ変換フロー(Entity / Model / DTO ) Entity (DB ) ->
Mapper -> Model (Domain ) <- Mapper <- DTO (API ) Entity: Data 層の永続化モデル(Room ) DTO: Data 層の通信モデル(OpenAPI 生成) Model: Domain 層のビジネスモデル(Pure Kotlin ) model/ はインフラ依存ゼロ(CI で担保) 8
iOS のUI アーキテクチャ 画面ごとに状態管理がバラバラだと、状態遷移の追跡とKMP 連携の責務分離が難しくなる 自作MVI アーキテクチャ(Store Pattern )を採用 9
iOS Store Pattern 基本構造 Intent: ユーザー操作を表現す る enum Store: Intent
受信とReducer 実 行 State: 画面の単一状態 View: 描画とIntent 送信 基本フロー Intent Store State View 10
iOS Store Pattern 概要 iOS 側は自前MVI をStore Pattern で実装 Android
MVI と読み方を揃え、チーム認知を統一 @Observable (iOS 17+ )でState 変更を自動検知 外部ライブラリ依存を増やさずKMP 統合をシンプルに維持 11
iOS Store Pattern (Intent 駆動) @MainActor @Observable final class MyPageStore
{ var state: MyPageViewState func send(_ intent: MyPageIntent) { switch intent { case .logoutTapped: state.showLogoutConfirmation = true case .logoutConfirmed: logoutTask = Task { @MainActor in await performLogout() } case .dipIdAuthCompleted(let result): handleAuthResult(result) } } } 12
Store Pattern のメリット 複雑な機能にスケールしやすい 同じパターンのまま機能拡張できる 小規模から大規模まで設計を継続できる Intent/State の分割で見通しを維持しやすい チーム運用しやすい Android
(MVI )と似た設計で読み方を統一 UI イベントの扱い方を共通化できる レビュー観点を揃えやすい Intent の入口をsend(_:) に統一することで、 KMP UseCase 呼び出しの責務と非同期処理を整理しやすい 13
KMP 連携の全体像 XCFRAMEWORK + OBJECTIVE-C ヘッダ経由 + SKIE SwiftUI View
→ Store → iOS Bridge Shared.xcframework → Objective-C ヘッダ(.h ) → KMP UseCase 配布単位は Shared.xcframework Kotlin API はObjective-C ヘッダとして公開され、Swift から利用される SKIE でSwift 側の呼び出し体験を改善(suspend → async , Flow → AsyncSequence ) 14
XCFramework 運用と今後 現行 ./gradlew :shared:assembleSharedXCFramework Xcode へ取り込み 運用は安定、改善余地はビルド時間 今後(Swift Export
) Objective-C ヘッダ経由の負担を減らせる可 能性 よりSwift らしいAPI 公開に期待 現時点はExperimental のため段階評価 Swift Export は現時点ではExperimental 。段階導入を前提に評価。 15
ご清聴ありがとうございました 16