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
36
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
100
IPによる地域制限の浅い話
mojage
0
20
Android Robo Test
mojage
0
59
栗まんじゅう問題を体感するアプリを作って入門した ARKit + SceneKit
mojage
0
110
Actions on Googleのアプリを作ってみた
mojage
0
110
SKStoreReviewController
mojage
0
440
スマホアプリ開発で位置情報をシミュレーションする
mojage
0
290
Other Decks in Technology
See All in Technology
Data Hubグループ 紹介資料
sansan33
PRO
0
2.2k
エンタメとAIのための3Dパラレルワールド構築(GPU UNITE 2025 特別講演)
pfn
PRO
0
620
[VPoE Global Summit] サービスレベル目標による信頼性への投資最適化
satos
0
210
混合雲環境整合異質工作流程工具運行關鍵業務 Job 的經驗分享
yaosiang
0
140
React19.2のuseEffectEventを追う
maguroalternative
2
590
もう外には出ない。より快適なフルリモート環境を目指して
mottyzzz
11
8k
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
5
43k
映像エッジAIにおけるNode-RED活用事例
emirmatsui
0
130
Findy Team+ QAチーム これからのチャレンジ!
findy_eventslides
0
500
webpack依存からの脱却!快適フロントエンド開発をViteで実現する #vuefes
bengo4com
2
1.7k
FinOps について (ちょっと) 本気出して考えてみた
skmkzyk
0
190
事業開発におけるDify活用事例
kentarofujii
4
1.2k
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
173
15k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.7k
Code Review Best Practice
trishagee
72
19k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
30
2.9k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Building a Modern Day E-commerce SEO Strategy
aleyda
44
7.8k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Why Our Code Smells
bkeepers
PRO
340
57k
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