Upgrade to Pro — share decks privately, control downloads, hide ads and more …

10分でわかるExpoEAS

 10分でわかるExpoEAS

React Native Matsuri 2021 のLT発表で使用した資料です。
LTの持ち時間が10分だったのでこのようなタイトルになっています。

81190ba1ece00c93c5d9736c2940895c?s=128

Takahiro Sugiura

October 02, 2021
Tweet

Transcript

  1. Takahiro Sugiura 10෼ͰΘ͔Δ Expo EAS React Native Matsuri 2021

  2. ࣗݾ঺հ ໊લ ਿӜɹ޹ܒ (Sugiura Takahiro) Twitter: @ta__sugi ࢓ࣄ SpesDen גࣜձࣾͰ

    React Native Λ࢖ͬͨ iOS & Android ΞϓϦ։ൃ લ৬Ͱ͸ Android ΞϓϦΤϯδχΞ
  3. ʢͬ͘͟ΓͱʣExpo ͱ͸

  4. Expoɹɹ͕ఏڙ͢Δػೳ • Expo SDK
 React Native + ศརͳϥΠϒϥϦͨ͘͞Μ • Ϋϥ΢υ্ͰͷϏϧυαʔϏεʢࠓճͷςʔϚͱ࠷΋ؔ࿈͕ڧ͍ʣ

    • ϓογϡ௨஌αʔϏε • Over The Air Ξοϓσʔτ
  5. ̎छྨͷϫʔΫϑϩʔ • Managed work fl owʢࢲ͕࢖ͬͯΔͷ͸ͬͪ͜ʣ • Expo ͕ωΟςΟϒΛӅṭͯ͘͠ΕΔͷͰɺJavaScript/TypeScript ͚ͩॻ͚

    ͹։ൃͰ͖Δ • ࣮ݱͰ͖Δػೳʹ੍໿͕͋Δ • Bare work fl ow • ։ൃͷࣗ༝౓͕ѹ౗తʹߴ͍ • ࣗ෼Ͱ؅ཧ͠ͳͯ͘͸͍͚ͳ͍߲໨͕૿͑Δ
  6. Expo Application Service (EAS)

  7. Expo EAS ͷొ৔ 2020೥຤ʹൃද͞Εͨ Expo ͷ৽ػೳ ݱࡏ͸ Feature Preview ѻ͍Ͱɺ༗ྉձһ͚͕ͩ࢖͑Δ


    ࠷ॳͷ̍ϲ݄͸τϥΠΞϧظؒͷͨΊແྉ
  8. EAS ͷߏ੒ EAS Build Ϋϥ΢υ্ͰΞϓϦΛϏϧυ͢ΔαʔϏε ैདྷͷϏϧυ͸ expo build ίϚϯυͰ࣮ߦͰ͖ΔɻEAS Build

    ͸ैདྷํ๏ʹ࣍ ͙ୈೋͷΦϓγϣϯ EAS Submit Ϗϧυͨ͠ΞϓϦ(ipa, aab)Λ Apple/Google ͷετΞʹExpo͕ఏग़ͯ͘͠ΕΔ αʔϏε
  9. EAS Build ͰԿ͕Ͱ͖Δͷʁ

  10. Ϋϥ΢υͰϏϧυ % eas build Expo ͷαʔόʔ্ͰϏϧυ
 ʢ͜Ε͸ैདྷ΋ಉ͡ʣ Bare work fl

    ow ͷ৔߹Ͱ΋
 ϏϧυՄೳ ैདྷͷϏϧυ͸ Managed work fl ow ݶఆͩͬͨ
  11. EAS Build ͸Ͳ͏΍ͬͯಈ͍ͯΔʁ • Expo αʔό͕΍ͬͯΔ͜ͱ 1. JS ͷґଘϥΠϒϥϦͱωΠςΟϒ
 ͷґଘϥΠϒϥϦΛΠϯετʔϧ

    2. Fastlane / Gradle Λ࣮ߦ • Managed ϫʔΫϑϩʔͰ΋ϥϯλΠϜͷΧελϚΠζ͕Ͱ͖Δ • ৄࡉ͸ Expo νʔϜͷϒϩάͰʂ • https://blog.expo.dev • “Expo managed work fl ow in 2021” ͱ͍͏هࣄʹৄ͘͠આ໌͕͋Γ·͢
  12. ϝϦοτ̍ɹΞϓϦαΠζ ैདྷํࣜͱൺ΂ͯ 
 ΞϓϦ͕খ͘͞ͳΔ Ϗϧυ࣌ʹΞϓϦͰ࢖͍ͬͯͳ͍
 ϥΠϒϥϦίʔυΛSDK͔Βআ֎͢ΔͨΊ ฐࣾΞϓϦͷ৔߹Ͱ 77.3MB ὎ 30.3MB

    ैདྷϏϧυ EAS Build
  13. ϝϦοτ̎ɹػೳͷ੍ݶ͕ݮΔ ωΠςΟϒίʔυΛؚΉ 
 ϥΠϒϥϦ΋࢖͑Δ ωΠςΟϒίʔυʢSwift, Kotlin ͳͲͰॻ͔ΕͨίʔυʣΛؚΉϥΠϒϥϦ͸ै དྷͷϏϧυͰ͸࢖͑ͳ͔͕ͬͨɺEAS Build Ͱ͸࢖͑ΔΑ͏ʹͳͬͨ


    ྫɿreact-native-fast-image, react-native-blurhash, react-native-date-picker, @react-native-voice/voice ͳͲ Ϗϧυ࣌ʹωΠςΟϒίʔυ΋௥Ճ͢Δॲཧ͕࣮ߦ͞ΕΔͨΊ
  14. ࢖͑ΔϥΠϒϥϦͷྫ react-native-blurhash ը૾Ͱ࢖ΘΕ͍ͯΔ৭ʹԠͯ͡ɺը૾ͷϓϨʔεϗϧμʔΛ͍͍ײ͡ ʹ͢Δπʔϧ͕ blurhash ɻreact-native-blurhash ͸ blurhash Λ RN

    Ͱ࢖͏ͨΊͷϥΠϒϥϦ Πϯετʔϧ ૉͷ RN ͷ৔߹ % npm i react-native-blurhash && npx pod-install EAS Build ͷ৔߹ package.json ʹ௥Ճ͢Δ͚ͩ
 Ϗϧυ࣌ʹ Expo ͷαʔόͰ pod install ૬౰ͷॲཧΛ࣮ߦͯ͘͠Ε Δ ը૾ͷҾ༻ݩ https://github.com/mrousavy/react-native-blurhash
  15. EAS Submit ͰԿ͕Ͱ͖Δͷʁ

  16. EAS Submit ͷ࢖͍ํ CLI CLI ͔Β % eas submit —platform

    ios ͷΑ͏ʹ͢Δͱఏग़Ͱ͖Δ ఏग़Ͱ͖ΔΞϓϦͷࡏॲ • ʢجຊʣEAS Build Ͱ࡞ͬͨΞϓϦΛExpoͷαʔόʔ͔Β௚઀ετΞʹఏग़ Ͱ͖Δ • ैདྷͷϏϧυͰ࡞ͬͨΞϓϦ΋ಉ༷ʹαʔόʔ͔Β௚઀ఏग़Ͱ͖Δ • ϩʔΧϧʹ͋ΔΞϓϦ
  17. CI ্Ͱ EAS Submit ΋ͪΖΜ CI ͔Β EAS Submit ΛτϦΨʔ͢Δ͜ͱ΋Ͱ͖Δ

    Github Actions ͱ EAS Build & Submit Λ࢖ͬͯɺ
 ϦϦʔεϒϥϯν΁ͷ push Λ͖͔͚ͬʹϏϧυ͔ΒετΞఏग़·ͰΛࣗಈԽ͠ ͍ͯΔ
  18. EAS Λ࢖ͬͨײ૝

  19. خ͔ͬͨ͜͠ͱ • ΞϓϦαΠζ͕খ͘͞ͳͬͨ • Managed work fl ow Ͱ΋࢖͑ΔϥΠϒϥϦ͕૿͑ͨ •

    Android Ͱ Hermes ͕࢖͑Δ • ʢ͜Ε͔Βਖ਼ࣜରԠͷ༧ఆʣManaged Work fl ow Ͱ΋ In App Purchase
  20. ͪΐͬͱࠔͬͨ͜ͱ API ͕ಥવมΘΔ Կ΋ͯ͠ͳ͍ͷʹ CI ͕յΕͨʂ
 CLI ͷΞοϓσʔτͰҾ਺ͷܗ͕ࣜมΘ͍ͬͯͨ ৘ใ͕গͳ͍ ӳޠɺ೔ຊޠͱ΋ʹwebʹ৘ใ͕গͳΊ

    ͓͔͍͠ͱࢥͬͨΒ
 Expo Forumʢhttps://forums.expo.dev)
 Ͱฉ͘ͷ͕ૣͦ͏
  21. ैདྷͷϏϧυ͔Β 
 ৐Γ׵͑ͯྑ͔ͬͨʂ ৐Γ׵͑΋؆୯