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
42
react-native-ffmpegを使って動画をいじくりmawasou
watanabeyu
0
750
react-native-unimodulesを用いてのApp内課金実装
watanabeyu
0
1.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
CDCL による厳密解法を採用した MILP ソルバー
imai448
3
130
強いチームと開発生産性
onk
PRO
35
11k
Can We Measure Developer Productivity?
ewolff
1
150
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.9k
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
500
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
540
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
420
Engineer Career Talk
lycorp_recruit_jp
0
190
Flutterによる 効率的なAndroid・iOS・Webアプリケーション開発の事例
recruitengineers
PRO
0
120
いざ、BSC討伐の旅
nikinusu
2
780
TypeScript、上達の瞬間
sadnessojisan
46
13k
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
243
12k
Fireside Chat
paigeccino
34
3k
Designing the Hi-DPI Web
ddemaree
280
34k
Teambox: Starting and Learning
jrom
133
8.8k
The Language of Interfaces
destraynor
154
24k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
Adopting Sorbet at Scale
ufuk
73
9.1k
For a Future-Friendly Web
brad_frost
175
9.4k
Designing Experiences People Love
moore
138
23k
Ruby is Unlike a Banana
tanoku
97
11k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Done Done
chrislema
181
16k
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)Ͱग़͠·͢ ࠓճൃදͨ͠༰͋Γ·͢͠ೱ͍༰ͷ༧ఆͰ͢