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
Search
Sosuke Okubo
March 29, 2019
Technology
0
33
Kotlin Multiplatform
Sosuke Okubo
March 29, 2019
Tweet
Share
More Decks by Sosuke Okubo
See All by Sosuke Okubo
“Build trust through better privacy”を見たメモ
mojage
0
99
IPによる地域制限の浅い話
mojage
0
16
Android Robo Test
mojage
0
57
栗まんじゅう問題を体感するアプリを作って入門した ARKit + SceneKit
mojage
0
100
Actions on Googleのアプリを作ってみた
mojage
0
110
SKStoreReviewController
mojage
0
440
スマホアプリ開発で位置情報をシミュレーションする
mojage
0
280
Other Decks in Technology
See All in Technology
整頓のジレンマとの戦い〜Tidy First?で振り返る事業とキャリアの歩み〜/Fighting the tidiness dilemma〜Business and Career Milestones Reflected on in Tidy First?〜
bitkey
2
16k
使いたいMCPサーバーはWeb APIをラップして自分で作る #QiitaBash
bengo4com
0
1.9k
ビギナーであり続ける/beginning
ikuodanaka
3
760
Delta airlines Customer®️ USA Contact Numbers: Complete 2025 Support Guide
deltahelp
0
700
SaaS型なのに自由度の高い本格CMSでサイト構築と運用のコスパ&タイパUP! MovableType.net の便利機能とユーザー事例のご紹介
masakah
0
110
生成AI活用の組織格差を解消する 〜ビジネス職のCursor導入が開発効率に与えた好循環〜 / Closing the Organizational Gap in AI Adoption
upamune
7
5.2k
AIの全社活用を推進するための安全なレールを敷いた話
shoheimitani
2
510
Beyond Kaniko: Navigating Unprivileged Container Image Creation
f30
0
130
AI時代の開発生産性を加速させるアーキテクチャ設計
plaidtech
PRO
3
160
品質と速度の両立:生成AI時代の品質保証アプローチ
odasho
1
350
Lazy application authentication with Tailscale
bluehatbrit
0
210
FOSS4G 2025 KANSAI QGISで点群データをいろいろしてみた
kou_kita
0
400
Featured
See All Featured
Writing Fast Ruby
sferik
628
62k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Music & Morning Musume
bryan
46
6.6k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.3k
Into the Great Unknown - MozCon
thekraken
40
1.9k
Faster Mobile Websites
deanohume
307
31k
Raft: Consensus for Rubyists
vanstee
140
7k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Site-Speed That Sticks
csswizardry
10
690
Transcript
Kotlin Multiplatform 2019/3/29 Xtone社内勉強会 Sosuke Okubo
Kotlin Multiplatformとは • Kotlinでマルチプラットフォームサービスを作る仕組み ◦ Kotlinはそもそもいろんなプラットフォームで動く ▪ Kotlin/JVM ▪ Kotlin/Native
▪ Kotlin/JS • Kotlin Multiplatformはプラットフォーム間でコードを共有する仕組みを提供してくれ るもの
iOSとAndroidでコードを共有する • Android → Kotlin/JVM • iOS → Kotlin/Native ◦
Kotlin/NativeがiOS向けのFrameworkを出力することができる ▪ つまりiOSからKotlinで書いたコードを呼べる ◦ KotlinからiOSのFrameworkも利用できる ▪ https://kotlinlang.org/docs/reference/native/objc_interop.html ▪ ただしObjective-Cに公開されているAPIのみ
デモ:公式チュートリアルをやってみる https://kotlinlang.org/docs/tutorials/native/mpp-ios-android.html
そのほかのMPP対応ライブラリ • Ktor Http Client ◦ httpクライアント ◦ KtorというKotlin製のサーバーフレームワークのコンポーネント •
kotlinx.serialization ◦ JSONやProtobufに対応したシリアライズライブラリ • Kodein ◦ DIコンテナ
まとめ • Kotlin MultiplatformでiOSとAndroidでコードを共有できる ◦ それぞれのプラットフォームでの開発の仕方は基本的には変わらない ◦ iOSはXcodeを、AndroidはAndroid Studioを使って今までどおり開発ができる •
夢がある
参考レポジトリ • https://github.com/JetBrains/kotlin-examples/tree/master/tutorials/mpp-iOS-An droid • https://github.com/ktorio/ktor-samples/tree/master/mpp/client-mpp • https://github.com/DroidKaigi/conference-app-2019 • https://github.com/JetBrains/kotlinconf-app
• https://github.com/adrianbukros/github-multiplatform-example