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
Expoで本番運用をしてみよう
Search
Yu Watanabe
September 13, 2018
Technology
2
1.1k
Expoで本番運用をしてみよう
Expoで本番運用をするときに必要なことをまとめてみました
Yu Watanabe
September 13, 2018
Tweet
Share
More Decks by Yu Watanabe
See All by Yu Watanabe
npm packageとリリースとモノレポ
watanabeyu
0
45
react-native-ffmpegを使って動画をいじくりmawasou
watanabeyu
0
770
react-native-unimodulesを用いてのApp内課金実装
watanabeyu
0
1.1k
gandhの紹介です
watanabeyu
0
26
XcodeやAndroid Studioを弄らないアイコン管理
watanabeyu
2
600
Firebaseオンリー + React Nativeでアプリを作ると果たして簡単になるのか?
watanabeyu
4
1.2k
react-native-unimodulesのススメ
watanabeyu
1
6.3k
JavaScript製npmパッケージをTypeScriptで書き直した話
watanabeyu
0
1k
React Native Expoで行うアプリの簡単最速運用
watanabeyu
0
310
Other Decks in Technology
See All in Technology
コンテナセキュリティのためのLandlock入門
nullpo_head
2
320
KnowledgeBaseDocuments APIでベクトルインデックス管理を自動化する
iidaxs
1
260
Oracle Cloud Infrastructure:2024年12月度サービス・アップデート
oracle4engineer
PRO
0
180
マルチプロダクト開発の現場でAWS Security Hubを1年以上運用して得た教訓
muziyoshiz
3
2.3k
DUSt3R, MASt3R, MASt3R-SfM にみる3D基盤モデル
spatial_ai_network
2
110
ガバメントクラウドのセキュリティ対策事例について
fujisawaryohei
0
530
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
310
株式会社ログラス − エンジニア向け会社説明資料 / Loglass Comapany Deck for Engineer
loglass2019
3
32k
Jetpack Composeで始めるServer Cache State
ogaclejapan
2
170
20241214_WACATE2024冬_テスト設計技法をチョット俯瞰してみよう
kzsuzuki
3
450
10分で学ぶKubernetesコンテナセキュリティ/10min-k8s-container-sec
mochizuki875
3
330
Wvlet: A New Flow-Style Query Language For Functional Data Modeling and Interactive Data Analysis - Trino Summit 2024
xerial
1
120
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
For a Future-Friendly Web
brad_frost
175
9.4k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Building Adaptive Systems
keathley
38
2.3k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Side Projects
sachag
452
42k
Transcript
2018/09/13 ΘͨͳΏ͏ EXPOͰຊ൪ӡ༻Λͯ͠ΈΑ͏
▸ ࣗݾհ ▸ Expoͬͯ·͔͢ʁ ▸ ExpoͰͷຊ൪ӡ༻ ▸ ։ൃڥͱຊ൪ڥͷ͚ํ ▸ ଟݴޠରԠ
▸ ΤϥʔτϥοΩϯά ▸ CodePushతͳػೳͷ͍ํ ▸ ·ͱΊ ֓ཁ
ࣗݾհ(1) ΘͨͳΏ͏ ▸ ॴଐ ▸ גࣜձࣾg&h ▸ Web / ΞϓϦΛझຯͰެ։
▸ ࣄ༰ ▸ αʔό / ϑϩϯτ / ΞϓϦ / Web ▸ ΞΧϯτ ▸ Twitter : @hmktsu ▸ Github : @watanabeyu
ࣗݾհ(2) ▸ https://www.gandh.jp ▸ 3໊(ΤϯδχΞࣗҰਓ)ͰฏۉྸߴΊͷγχΞձࣾ ▸ ΤϯλϝܥʹಛԽͨ͠αʔϏεΛओʹӡӦ ▸ WeddyWeddy(ݱࡏࠐதͰ10݄ϦϦʔε༧ఆ) ▸
μϯαʔ͚ಈըϓϥοτϑΥʔϜ ▸ Spotful(ൢചཧళ) ▸ ΧφμൃΠϯλϥΫςΟϒಈըαʔϏε ▸ getstage(΄΅Ϋϩʔζ) ▸ ϛϡʔδγϟϯ/μϯαʔ/DJʹಛԽͨ͠ΦϯϥΠϯϚονϯάαʔϏε ▸ Partee(Ϋϩʔζ) ▸ ࣸਅσβΠϯΛΦϦδφϧάοζͱͯ͠࡞Ͱ͖ΔΞϓϦ ݱࡏWeddyWeddyΛϝΠϯʹνΣέϥονϣத
EXPOͰຊ൪ӡ༻Λͯ͠ΈΑ͏ Expoͬͯ·͔͢ʁ
▸ ExpoͬͯԿͳͷʁ ▸ શʹJSͷΈͰΞϓϦ͕࡞Մೳ(XcodeɺAndroid Studio͍Βͣ) ▸ ωΠςΟϒͳAPIΛExpo SDKͱͯ͠แׅ ▸ CodePushతͳͷ࠷ॳ͔Β͑Δ
▸ όʔδϣϯ্͕͕Δ͝ͱʹػೳ͕ͨ͘͞ΜՃ EXPOͬͯ·͔͢ʁ(1)
▸ Expoʹର͢Δෆ҆ͷ ▸ JSͷΈ͔͠৮Εͳ͍ͷͰ։ൃͰ͖ͳ͍ػೳ͕͋Δ ▸ react-native linkͰ͖ͳ͍͔Β֎෦ͷSDK͑ͳ͍ ▸ react-nativeຊମͷΞοϓσʔτʹ͙͢ʹରԠͰ͖ͳ͍ ▸
detach͢Δͷ͕ҋਂ͍ͱ͍͏͔͠ฉ͍ͨ͜ͱͳ͍ ▸ ຊ൪Ͱ͍ͬͯΔਓ͍Δͷʁ EXPOͬͯ·͔͢ʁ(2) Ҏલʹൃදͨ͠༰͕͋ΔͷͰͦͪΒΛࢀߟʹͲ͏ͧ ػೳຖʹϥΠϒϥϦͳͲͷհΛ͍ͯ͠·͢ https://speakerdeck.com/watanabeyu/shi-li-dejian-ruexpopurodakusiyonapuri (גࣜձࣾFACTBASE͞ΜͰͷษڧձʹͯൃද) ຊʹຊ൪Ͱެ։Ͱ͖ΔΑ͏ͳΞϓϦ࡞ͬͨͷʁ
EXPOͰຊ൪ӡ༻Λͯ͠ΈΑ͏ ExpoͰͷຊ൪ӡ༻
EXPOͰຊ൪ӡ༻Λͯ͠ΈΑ͏ ։ൃڥͱຊ൪ڥͷ͚ํ
▸ ຊ൪ӡ༻Λ͢Δʹ͋ͨͬͯ։ൃͱॾʑͷઃఆ͕ҧ͏ ▸ APIͷΤϯυϙΠϯτ ▸ firebaseͷΩʔใ ▸ ͳͲͳͲ… ։ൃڥͱຊ൪ڥͷ͚ํ(1) ▸
react-native-configΛ͏ ▸ .envϑΝΠϧΛ࡞ͯ͠Ϗϧυ࣌ʹࢦఆͯ͠ସ ▸ $ ENVFILE=.env.staging react-native run-ios ௨ৗͷReact Native։ൃͰͲ͏͢Δͷ͔ʁ
▸ 1. release-channelΛ͏ ▸ publish / build͢Δࡍʹ--release-channel <environment>Ͱସ ▸ Constants.manifest.releaseChannel
=== “environment”Ͱผ ։ൃڥͱຊ൪ڥͷ͚ํ(2) ExpoڥԼͰͲ͏ͨ͠ΒΑ͍ͷ͔ʁ EXPO.HOST exp publish —release-channel development development exp publish —release-channel production production
▸ 2. app.jsonΛγϯϘϦοΫϦϯΫͰସ ▸ app.development.json / app.production.jsonΛ࡞ ▸ publish /
build͢ΔࡍʹγϯϘϦοΫϦϯΫͰସ ▸ $ ln -fs app.development.json app.json && expo build:ios ▸ Constans.manifest.extra.hogeͱͯ͠औΓग़͠ ։ൃڥͱຊ൪ڥͷ͚ํ(3) ExpoڥԼͰͲ͏ͨ͠ΒΑ͍ͷ͔ʁ APP.DEVELOPMENT.JSON APP.JSON APP.PRODUCTION.JSON ln -fs app.development.json app.json ln -fs app.production.json app.json expo build:ios -release-channel <environment>
EXPOͰຊ൪ӡ༻Λͯ͠ΈΑ͏ ଟݴޠରԠ
▸ άϩʔόϧʹΞϓϦΛग़͍ͨ͠ ▸ Permission֬ೝ࣌ͷΞϥʔτจݴΛมߋ͍ͨ͠ ▸ ϗʔϜը໘ͰͷΞϓϦද໊ࣔΛݴޠ͝ͱʹมߋ͍ͨ͠ ▸ จݴΛݴޠ͝ͱʹมߋ͍ͨ͠ ▸ ͳͲͳͲ…
ଟݴޠରԠ(1) ▸ Xcode্ͰinfoPlistΛϩʔΧϥΠζͯ͠ઃఆ ▸ Android Studio্Ͱstrings.xmlΛϩʔΧϥΠζͯ͠ઃఆ ௨ৗͷReact Native։ൃͰͲ͏͢Δͷ͔ʁ
▸ 1. app.jsonͷlocalesΛͬͯύʔϛογϣϯμΠΞϩάΛมߋ ▸ ݴޠ͝ͱʹద༻͍ͤͨ͞infoPlistΛॻ͍ͨjsonͷύεΛࢦఆ ଟݴޠରԠ(2) ʙύʔϛογϣϯμΠΞϩάͳͲʙ ExpoڥԼͰͲ͏ͨ͠ΒΑ͍ͷ͔ʁ app.json languages/ja.json
▸ 2. ex-react-native-i18nΛͬͯΞϓϦͷจݴΛϩʔΧϥΠζ ▸ ͪͳΈʹreact-i18next༻Մೳ ଟݴޠରԠ(3) ʙΞϓϦจݴͷϩʔΧϥΠζʙ ExpoڥԼͰͲ͏ͨ͠ΒΑ͍ͷ͔ʁ src/i18n/ja.json src/i18n/en.json
src/i18n/index.js src/screens/HomeScreen.js
EXPOͰຊ൪ӡ༻Λͯ͠ΈΑ͏ ΤϥʔτϥοΩϯά
▸ ΞϓϦ͕Ϋϥογϡͨ͠ݪҼΛ୳Γ͍ͨ ▸ ωΠςΟϒίʔυ͕ݪҼͳͷ͔ʁ ▸ JSͰॻ͍ͨίʔυ͕ݪҼͳͷ͔ʁ ΤϥʔτϥοΩϯά(1) ▸ react-native-fabric(Crashlytics)Λ͏ ▸
react-native-sentryΛ͏ ௨ৗͷReact Native։ൃͰͲ͏͢Δͷ͔ʁ
▸ ωΠςΟϒίʔυ෦ExpoͰแׅͯ͠ΔͷͰແࢹ ▸ sentry-expoΛͬͯJS෦ͷΤϥʔτϥοΩϯάΛߦ͏ ΤϥʔτϥοΩϯά(2) ExpoڥԼͰͲ͏ͨ͠ΒΑ͍ͷ͔ʁ App.js app.json
EXPOͰຊ൪ӡ༻Λͯ͠ΈΑ͏ CodePushతͳػೳͷ͍ํ
▸ ΞϓϦετΞʹਃ͠ͳͯ͘ΞοϓσʔτΛ͢Δ͜ͱ͕Մೳ ▸ https://www.appcenter.ms CODEPUSHతͳػೳͷ͍ํ(1)
▸ σϑΥϧτͰONʹͳ͍ͬͯΔͷͰઃఆෆཁ ▸ app.jsonͷupdatesͱ͍͏߲Λฤू͢Δ͜ͱͰOFFʹͰ͖Δ ▸ publish͢Δ͜ͱͰελϯυΞϩʔϯΞϓϦ͕Ξοϓσʔτ͞ΕΔ CODEPUSHతͳػೳͷ͍ํ(2) ExpoڥԼͰͲ͏ͨ͠ΒΑ͍ͷ͔ʁ EXPO.HOST exp
publish —release-channel development exp publish —release-channel production development͕ߋ৽͞ΕΔ production͕ߋ৽͞ΕΔ ࠷ॳʹελϯυΞϩʔϯΞϓϦΛϏϧυͯ͠ ࣗͨͪʹ͓ͯ͘͠ͱ࣮ػ֬ೝ͕؆୯ʹ
·ͱΊ ▸ ڥͷସ ▸ -release-channelΛ͏ ▸ app.jsonΛγϯϘϦοΫϦϯΫͰΓସ͑ ▸ ଟݴޠରԠ ▸
γεςϜ෦app.jsonͷlocalesΛ༻ ▸ ΞϓϦจݴex-react-native-i18nΛ༻ ▸ ΤϥʔτϥοΩϯά ▸ JS෦ͷΈߦ͑Α͘sentryͷτϥοΩϯάίʔυΛsentry-expoͰຒΊࠐΉ ▸ CodePushతͳػೳσϑΥϧτͰON ▸ ࠷ॳʹελϯυΞϩʔϯΞϓϦΛ ▸ exp publishͰਵ࣌өͤ͞Δͱ࣮ػ֬ೝ͕؆୯ʹ
༨ஊ μϯαʔ͚ͷಈըϓϥοτϑΥʔϜΞϓϦ࡞ͬͯ·͢ͷͰ ڵຯ͋Δํ͠·͠ΐ͏ @ggtmtmgg͞Μͱ@AkiraTameto͞ΜͱҰॹʹ ExpoຊΛٕज़ॻల(10/8 ͏-71)Ͱग़͠·͢ ࠓճൃදͨ͠༰͋Γ·͢͠ೱ͍༰ͷ༧ఆͰ͢