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

Xamarin.Forms Hot Reload のススメ

amay077
August 31, 2019

Xamarin.Forms Hot Reload のススメ

amay077

August 31, 2019
Tweet

More Decks by amay077

Other Decks in Programming

Transcript

  1. Xamarin.Forms
    Hot Reload ͷεεϝ
    2019.8.31 JXUG @amay077

    View full-size slide

  2. About me
    • Ԟࢁ ༟ਈ - @amay077ʢ͋Ί͍ʣ
    • Android, iOS, Xamarin, TypeScript AWS, Azure…
    • Ѫ஌ݝࡏॅͷϑϧϦϞʔτϫʔΧʔ
    • ஍ཧ৘ใγεςϜɺҐஔ৘ใϓϩάϥϛϯά
    • DroidKaigi2017ొஃˠٕज़ॻయ2→঎ۀຊԽ(ڞஶ)


    View full-size slide

  3. ࠓ೔͓͸ͳ͢͠Δ͜ͱ
    Xamarin.Forms UI։ൃπʔϧͷྺ࢙
    Official ͳ Hot Reload ͕Ωλʂ
    Xamarin.Forms Ͱ Hot Reload Ͱ͖Δπʔϧ͍Ζ
    ͍Ζ
    Any Platform ࣌୅ͷը໘։ൃ


    View full-size slide

  4. Xamarin.Forms
    UI։ൃπʔϧͷྺ࢙
    Xamarin | Forms | XAML | Live
    | Player | Viewer | Previewer
    ଟ͗͢໰୊

    View full-size slide

  5. Xamarin.Forms 1.xʙ2.x
    ϓϨϏϡʔΞ΋σβΠφ΋Կ΋ͳ͔ͬͨ…
    ͨͩ໧ͬͯRun&Watch


    View full-size slide

  6. XAML Previewer | Viewer
    (Xamarin.Forms Previewer)
    ొ৔: 2016೥4݄ࠒ ʙ ݱଘ
    هड़ͨ͠XAMLίʔυΛVisual StudioͰϓϨϏϡʔදࣔ͢Δػೳ
    ݱࡏ͸ Visual Studio ͷ XAMLΛ։͍ͨը໘ʹ౷߹
    ػೳ໊ͷ༳Ε͕ώυ͍w
    (ࢲݟ)͙Δ͙Δ͕ফ͑ͳ͔ͬͨΓਅͬനͩͬͨΓΤϥʔ͕ग़ͨ
    Γɺ໾ʹཱͬͨهԱ͕ͳ͍
    ࠷ۙͰ͸ʮσβΠϯλΠϜσʔλʯʹ΋ରԠͯ͠Δͦ͏Ͱ͢


    View full-size slide

  7. Xamarin Live Player
    ొ৔: 2017೥5݄ࠒ ʙ 2018೥8݄ࠒ
    Mac͕ͳ͘ͱ΋iOSσόΠε΁։ൃதͷΞϓϦ͕సૹɾ
    ։ൃͰ͖Δͱ͞Ε͕࣮ͨࡍ͸੍໿͕ଟ͘…
    ࣮ଶ͸C#ΠϯλϓϦλΛ౥ࡌͨ͠ΞϓϦ
    AppStore͔ΒBAN͞ΕɺTestFlightͰͷެ։΋ఀࢭ͞Ε
    ࣄ্࣮ऴྃ


    View full-size slide

  8. Xamarin Live Reload
    ొ৔: 2018೥4݄ࠒ ʙ 2018೥10݄ࠒ
    XAMLͷมߋΛΞϓϦʹసૹ͠ɺଈ࣌ʹ࣮ࡍͷΞϓϦʹద༻͢Δ
    ͍ΘΏΔʮHot Reloadʯػೳ
    ϓϨϏϡʔ൛ͷ··ఀ଺͠ɺVS for Mac ʹ͸ఏڙ͢Β͞Εͣ։
    ൃऴྃ
    (ࢲݟ)ಉ࣌ظʹLive Player΋ऴྃ͠Web΍FlutterͰ͸ओྲྀͰ͋Δ
    ʮϥΠϒ։ൃʯ΁ͷಓ͕ด͟͞Εͨͱͯ͠େ͍ʹࣦ๬


    View full-size slide

  9. ʮLive Reload ͸ࢮΜͩͱݴͬͨͳɺ
    ΞϨ͸΢ιͩʯ

    View full-size slide

  10. Live Reload վΊ
    XAML Hot Reload
    for Xamarin.Forms
    ొ৔
    ※Live Reload ͱͷؔ࿈͸֬ೝͰ͖·ͤΜ

    View full-size slide

  11. XAML Hot Reload for Xamarin.Forms
    2019೥಺ϦϦʔε༧ఆ(ݱࡏ͸ϓϨϏϡʔ൛)
    Visual Studio 2019 / Visual Studio for Mac ૒ํͰར༻
    Մೳ
    ௥Ճͷ Add-in ΍ nuget ύοέʔδෆཁ
    ͨͩ͠ nuget Xamarin.Forms 4.1.0.581475 Ҏ্͕ඞཁ
    ਖ਼ࣜϦϦʔε͞ΕΔ·ͰؾΛൈ͘ͳʂ


    View full-size slide

  12. HotReload for XF Ҏ֎ͷબ୒ࢶ
    (ͱ͍͏͔ઌۦ͚)

    View full-size slide

  13. LiveXAML
    http://www.livexaml.com/
    IDEʹAddinɺΞϓϦʹLiveXAML.dll ͕ඞཁ
    $240/∞
    ݹ͍ Xamarin.Forms Ͱ΋ಈ͘(3.x Ͱ֬ೝ)
    UWP ʹ΋ରԠ
    ෳ਺σόΠεಉ࣮࣌ߦՄೳ


    View full-size slide

  14. AndreiMisiukevich/HotReload
    https://github.com/AndreiMisiukevich/
    HotReload
    VS for Win/Mac, Rider, VSCode ͳͲͰ΋࢖͑Δ
    C# ίʔυมߋͷHot Reload΋Մೳ(࣮ػͰ͸ෆ
    Մ)


    View full-size slide

  15. LiveSharp
    https://github.com/OYIon/LiveSharp
    LiveXAML ͱಉ͡ਓ(νʔϜ?)͕࡞ͬͯΔ
    C# ίʔυมߋͷHot Reload͕Մೳ


    View full-size slide

  16. pranshu-aggarwal/HotReloading
    https://github.com/pranshu-aggarwal/
    HotReloading
    C# ίʔυมߋͷHot Reload͕Մೳ
    Xamarin.Forms ͷ৔߹ 3.4.0Ҏ্͕ඞཁ


    View full-size slide

  17. Any Platform ࣌୅ͷը໘։ൃ
    for MS Developers

    View full-size slide

  18. UIΤσΟλ΍ϓϨϏϡʔΞͷݶք
    ʮ࣮ࡍʹಈ͍͍ͯΔΞϓϦʯͰ͸ͳ͍
    ࣮ߦ؀ڥ΋։ൃ؀ڥ΋WinͳΒ·ͩ࠶ݱੑ͸ߴ͔ͬͨ
    iPhoneΞϓϦͷݟͨ໨ΛWindows্Ͱ࠶ݱ͢ΔͷʹϜϦ͕
    ͋Δͷ͸໌ന
    ಛʹϓϥοτϑΥʔϜґଘͷϥΠϒϥϦΛ࢖͍ͬͯΔ৔߹
    ͸ඳը͸ෆՄ
    ੿࡞ Xamarin.Forms.GoogleMaps ͸ͦͷҰྫ


    View full-size slide

  19. ͦ͜Ͱ Hot Reload Ͱ͢Α
    ʮ࣮ࡍʹಈ͍͍ͯΔΞϓϦʯͰ֬ೝͰ͖Δ
    ތுͳ͠ʹʮ࠶ݱ཰100%ʯ
    ݸਓతʹ͸ XAML Previewer ͸શ͘࢖͍ͬͯ·ͤΜ
    Previewer ΑΓ΋ Hot Reload ʹ։ൃύϫʔ࢖ͬͯ΄
    ͍͠ > Visuals Studio νʔϜ͞Μ


    View full-size slide

  20. ·ͱΊ
    Any Platform࣌୅ʹ͸ Hot Reload ͕࠷ద
    ৽نҊ݅ʹ͸ Hot Reload for XFɺ

    طଘҊ݅ʹ͸ LiveXAML ΍ͦͷଞOSSπʔϧ
    C# ίʔυͷ HotReload πʔϧ΋ಋೖ͢Ε͹ແఢ
    ʮ࣮ࡍͷΞϓϦʯͰαΫαΫ֬ೝ͠ͳ͕Βը໘Λ࡞Ζ
    ͏ʂ


    View full-size slide

  21. ͝ਗ਼ௌ
    ͋Γ͕ͱ͏͍͟͝·ͨ͠"

    View full-size slide