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

React Nativeでアプリのアップデートが楽になる話

React Nativeでアプリのアップデートが楽になる話

SonicGarden Tech #2で話したときに使ったスライドです。

Hiromasa Ohno

July 14, 2018
Tweet

More Decks by Hiromasa Ohno

Other Decks in Programming

Transcript

  1. ࣗݾ঺հ • Hiromasa Ohno • aka @pi-chan || @pi_cha_n •

    ιχοΫΨʔσϯ • ඿দੜ·Ε඿দҭͪ • ඿๺۠ࡏॅ • Rails / iOS / React Native Λੜۀ
  2. NativeΞϓϦͷϦϦʔε • Ϗϧυ + Ξοϓϩʔυʹ͕͔͔࣌ؒΔ • ৹ࠪʹ͕͔͔࣌ؒΔ • ϨϏϡϫʔʹΑͬͯ͸ٸʹϦδΣΫτ͞ΕΔ •

    ʢ͍͍ͩͨiOSͷ࿩͔΋ʣ • ͪΐͬͱ͚ͩ௚͢ϋʔυϧ͕ߴ͘ͳΔ͠ɺ
 ຌϛεͰόάͬͨͱ͖ʹ͙͢ʹ௚ͤͳ͍͠ɺࠔΔ

  3. Native App URL ref JS Bundle RNΞϓϦͷ࣮ମ • ϝΠϯͷίʔυ͸JS •

    ωΠςΟϒ͸ԼճΓ • ωΠςΟϒͱJS͕ಠཱ • JSϑΝΠϧΛURLͰࢀর
  4. Visual Studio AppCenter Build JS & Deploy to AppCenter Native

    App JS Bundle Check New Ver. Download & Update JS Bundle
  5. ίʔυͷมߋ఺ʢNativeଆʣ AppDelegate.m jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; AppDelegate.m #ifdef

    DEBUG jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; #else jsCodeLocation = [CodePush bundleURL]; #endif
  6. CodePushҎ߱ͷϦϦʔεखॱ • Native࣮૷ͷมߋΛ൐͏ϦϦʔε • NativeΞϓϦΛϏϧυ • ϓϥοτϑΥʔϜ΁Upload • ৹ࠪఏग़ •

    waiting • ϦϦʔε • ͬͪ͜͸ಉ͡ʂ • JSͷΈͷมߋͷϦϦʔε • JSΛϏϧυʢjsbundleʣ • AppCenter΁CLIͰupload • ͓ΘΓ • ৹ࠪͳ͠ʂ
  7. JSͷΈͷมߋͬͯԿͩΖ͏͔ • JSଆόάमਖ਼ • UIͷมߋ • ը໘૿ • ϨΠΞ΢τมߋ •

    APIݺͼग़͠मਖ਼ • JSϥΠϒϥϦͷมߋɾ௥Ճ • Native࣮૷͕ແ͍΋ͷͰ͋Ε͹OK Native SDK React Native JS API Application & 3rd-party Lib React Native Bridge React Native Native Implementation Native Code