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
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
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
170
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.8k
Security-JAWS【第35回】勉強会クラウドにおけるマルウェアやコンテンツ改ざんへの対策
4su_para
0
180
SSMRunbook作成の勘所_20241120
koichiotomo
2
130
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
220
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
0
110
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1k
AIチャットボット開発への生成AI活用
ryomrt
0
170
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
250
Engineer Career Talk
lycorp_recruit_jp
0
170
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
380
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
133
8.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
A Philosophy of Restraint
colly
203
16k
Designing for Performance
lara
604
68k
A better future with KSS
kneath
238
17k
The Cult of Friendly URLs
andyhume
78
6k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
860
What's new in Ruby 2.0
geeforr
343
31k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Documentation Writing (for coders)
carmenintech
65
4.4k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
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)Ͱग़͠·͢ ࠓճൃදͨ͠༰͋Γ·͢͠ೱ͍༰ͷ༧ఆͰ͢