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
41
react-native-ffmpegを使って動画をいじくりmawasou
watanabeyu
0
730
react-native-unimodulesを用いてのApp内課金実装
watanabeyu
0
1k
gandhの紹介です
watanabeyu
0
26
XcodeやAndroid Studioを弄らないアイコン管理
watanabeyu
2
590
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
300
Other Decks in Technology
See All in Technology
10分でわかるfreeeのQA
freee
1
3.4k
形式手法の 10 メートル手前 #kernelvm / Kernel VM Study Hokuriku Part 7
ytaka23
5
710
福岡新卒エンジニアの会
teba_eleven
1
170
3次元点群データ「VIRTUAL SHIZUOKA』のオープンデータ化による恩恵と協働の未来/FOSS4G Japan 2024
kazz24s
0
110
Datachain会社紹介資料(2024年11月) / Company Deck
datachain
4
17k
신뢰할 수 있는 AI 검색 엔진을 만들기 위한 Liner의 여정
huffon
0
530
ドメイン名の終活について - JPAAWG 7th -
mikit
18
9.6k
プロダクトエンジニアが活躍する環境を作りたくて 事業責任者になった話 ~プロダクトエンジニアの行き着く先~
gimupop
1
600
スクラムチームを立ち上げる〜チーム開発で得られたもの・得られなかったもの〜
ohnoeight
1
180
社内で最大の技術的負債のリファクタリングに取り組んだお話し
kidooonn
0
330
Microsoft MVPになる前、なってから/Fukuoka_Tech_Women_Community_1_baba
nina01
0
170
Postmanの日本市場におけるDevRel (的) 活動 / Postman's DevRelish activities in Japan
yokawasa
1
110
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Music & Morning Musume
bryan
46
6.2k
Side Projects
sachag
452
42k
The World Runs on Bad Software
bkeepers
PRO
65
11k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
The Language of Interfaces
destraynor
154
24k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
32
1.8k
Unsuck your backbone
ammeep
668
57k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
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)Ͱग़͠·͢ ࠓճൃදͨ͠༰͋Γ·͢͠ೱ͍༰ͷ༧ఆͰ͢