$30 off During Our Annual Pro Sale. View Details »

Add-to-appの戦い方

 Add-to-appの戦い方

Koji Wakamiya

October 06, 2022
Tweet

More Decks by Koji Wakamiya

Other Decks in Programming

Transcript

  1. Add-to-appͷઓ͍ํ @koji-1009 1

  2. DroidKaigi 2

  3. ࣗݾ঺հ • एٶߒ࢘/@koji-1009(GitHub) • ελσΟϓϥεגࣜձࣾ ◦ ϞόΠϧΫϥΠΞϯτνʔϜ ςοΫϦʔυ • Google

    for Startups Accelerator 2022 3
  4. ελσΟϓϥεגࣜձࣾ • Mission ◦ ֶͿتͼΛ͢΂ͯͷਓ΁ • Value ◦ Dive to

    Learn - ֶशऀͷͨΊʹ΍Ζ͏ ◦ Fail Forward - ͲΜͲΜࣦഊ͠Α͏ ◦ Far Together - ҧ͍ʹ׮༰Ͱ͋Ζ͏ 4
  5. 5 Studyplus • ֶशه࿥Λ࡞੒͠ɺ౤ߘ͢Δ͜ ͱͰֶͼͷܧଓΛαϙʔτ • ిࢠ൛ͷֶशࢀߟॻ200࡭Ҏ্ ͕࢖͍์୊ɺʰStudyplusϒοΫ ಡΈ์୊ʱ΋ఏڙத

  6. 6 Studyplus for School • ઌੜ͕ੜెͷ೔ʑͷษڧΛα ϙʔτͰ͖Δɺֶश؅ཧϓϥο τϑΥʔϜ • toB޲͚ʹɺֶߍ΍ֶशक़ͳͲ

    ʹ޲͚ͯల։
  7. StudyplusͱAdd-to-app • 2021೥8݄͝Ζ͔Βར༻ • ʰStudyplusϒοΫಡΈ์୊ʱͷॻ੶ϏϡʔΞʔͰ࠾༻ ◦ ࠷ॳ͸FlutterΞϓϦέʔγϣϯ޲͚ʹ։ൃ ◦ ϏϡʔΞʔػೳΛStudyplusʹ౷߹͢Δʹ͋ͨΓɺ
 Add-to-appͰAndroidͱiOSΞϓϦέʔγϣϯʹ௥Ճ

    7
  8. ໨࣍ • ຊηογϣϯʹ͍ͭͯ • Add-to-appͱ͸ • Add-to-appͷϝϦοτ • Add-to-appͷσϝϦοτ •

    Add-to-appͷઓ͍ํ 8
  9. ຊηογϣϯͰ঺հ͢Δൣғ • Flutter ◦ ΄΅ղઆ͠·ͤΜ ◦ 2022.11ʹFlutterKaigi͕։࠵͞Ε·͢ • Add-to-app ◦

    ηογϣϯͷཧղʹඞཁͳൣғͰղઆ͠·͢ ◦ ࡉ͔ͳ࿩͸FlutterͷGitHub Issue͔ηογϣϯͷ࣭໰ʹͯ 9
  10. ຊηογϣϯͷର৅ • FlutterʹΑΔΞϓϦέʔγϣϯΛ͢Ͱʹ։ൃ͍ͯ͠Δ • Add-to-appΛ͢Ͱʹ࠾༻͍ͯ͠Δ • Add-to-appͷ࠾༻Λݕ౼͍ͯ͠Δ • Jetpack ComposeͱAdd-to-appͷͲͪΒΛ࠾༻͢Δ͔೰ΜͰ͍Δ

    10
  11. ຊηογϣϯͷର৅ • FlutterʹΑΔΞϓϦέʔγϣϯΛ͢Ͱʹ։ൃ͍ͯ͠Δ • Add-to-appΛ͢Ͱʹ࠾༻͍ͯ͠Δ • Add-to-appͷ࠾༻Λݕ౼͍ͯ͠Δ • Jetpack ComposeͱAdd-to-appͷͲͪΒΛ࠾༻͢Δ͔೰ΜͰ͍Δ

    11
  12. ຊηογϣϯͷ໨త Add-to-appΛར༻ͨ͠ΞϓϦέʔγϣϯ։ൃʹ͍ͭͯɺ
 ͭ·ΓAdd-to-appͷઓ͍ํʹ͍ͭͯ঺հ͠·͢ 12

  13. 2022೥ݱࡏʹAdd-to-appΛݕ౼͢Δࣄ৘ • એݴతUIΛಋೖ͍ͨ͠ • Material DesignΛiOSͰ࢖͍͍ͨ 13

  14. 2022೥ݱࡏʹAdd-to-appΛݕ౼͢Δࣄ৘ • એݴతUIΛಋೖ͍ͨ͠ ◦ Jetpack Compose/SwiftUIͰΑ͍ͷͰ͸……? • Material DesignΛiOSͰ࢖͍͍ͨ ◦

    iOS޲͚ͳΒHIGʹ४ڌͨ͠ํ͕Α͍ͷͰ͸……? ◦ (iOS޲͚ͷMDCͷ։ൃ͕ऴྃͨ͠ͷͰɺΞϦͱ͍͑͹ΞϦ) 14
  15. 2022೥ݱࡏʹAdd-to-appΛݕ౼͢Δࣄ৘ • FlutterͰϦϓϨʔε͢ΔͷͰɺஈ֊తͳಋೖΛߦ͍͍ͨ • ෳ਺ϓϥοτϑΥʔϜ޲͚ͷΞϓϦέʔγϣϯʹɺ
 ୯ҰͷιʔείʔυͰػೳΛ։ൃ͍ͨ͠ 15

  16. Add-to-appͱ͸ 16

  17. Add-to-appͷ֓ཁ • FlutterͷViewΛAndroid΍iOSΞϓϦέʔγϣϯʹ૊ΈࠐΊΔػೳ • FlutterActivity/FlutterFragmentΛJava/Kotlin͔Βݺͼग़͠ ◦ AARΛFlutterͰ࡞੒͠Gradleܦ༝ͰಡΈࠐΈ ◦ iOSͷ৔߹͸CocoaPodsܦ༝ͰಡΈࠐΈ ▪

    https://github.com/flutter/flutter/issues/33850 ◦ ͦΕҎ֎ͷํ๏͸ެࣜυΩϡϝϯτ΁ ▪ https://docs.flutter.dev/development/add-to-app 17
  18. Add-to-appͷ֓ཁ • Add-to-appͱ௨ৗͷFlutterΞϓϦέʔγϣϯ͸΄΅ಉ͡ ◦ AndroidΞϓϦέʔγϣϯ಺ͰFlutterΛද͍ࣔͯ͠Δ͚ͩ • FlutterͱJava/KotlinͷؒͰ͸Platform ChannelΛར༻ ◦ Flutter͔ΒAndroid΍iOSͷػೳΛݺͼग़͢࢓૊Έ

    ◦ JSONܗࣜͷStringΛར༻͢Ε͹େ఍ͷ͜ͱ͸Մೳ ◦ Pigeon ▪ https://pub.dev/packages/pigeon 18
  19. Add-to-appͷ֓ཁ • ϓϥάΠϯͷґଘؔ܎ͷ΍΍͜͠͞ ◦ ωΠςΟϒΞϓϦέʔγϣϯͱɺAdd-to-appͷ྆ํ͕ґଘ͢Δ ◦ όʔδϣϯͷ੔߹ੑ͕औΕΔঢ়ଶʹ͢Δඞཁ͕ੜ͡Δ ▪ ྫ͑͹FirebaseΛಋೖ͢Δ৔߹ ▪

    ωΠςΟϒͱAdd-to-appͰಉ͡ϥΠϒϥϦΛࢀর͢Δέʔε 19
  20. Add-to-appͷ֓ཁ • Add-to-appͷ೉қ౓ ◦ લड़ͷ஌ࣝͱFlutterͷ஌͕ࣝ͋Ε͹࢝ΊΒΕΔ ◦ FlutterΛஈ֊తʹಋೖ͢Δख๏ͱͯ͠͸࠷ద 20

  21. Add-to-appͷϝϦοτ 21

  22. Add-to-appͷϝϦοτ • ϩδοΫͷڞ௨ԽʹΑΔɺ࢓༷ɾ࣮૷ɾݕূίετͷ࡟ݮ • ϓϥοτϑΥʔϜ͝ͱͰ͸ͳ͘ɺػೳ͝ͱͷ୲౰νʔϜ • FlutterΛ࠾༻͢ΔϦεΫ΍՝୊ͷݕূΛɺখ࢝͘͞ΊΒΕΔ 22

  23. ࢓༷ɾ࣮૷ɾݕূίετͷ࡟ݮ • ϓϥοτϑΥʔϜ͝ͱͷ࡞ۀ͕ෆཁʹͳΔέʔε͕͋Δ ◦ ϓϥοτϑΥʔϜʹ߹Θͤͨػೳ΍ը໘σβΠϯ ◦ KotlinͱSwiftͰߦ͍࣮ͬͯͨ૷ ◦ ϓϥοτϑΥʔϜࠩҟ͕૊Έࠐ·Εͨݕূϑϩʔ 23

  24. ػೳ͝ͱͷ୲౰νʔϜ • ػೳʹରͯ͠ϓϥοτϑΥʔϜ͝ͱͷ୲౰ऀͰ͸ͳ͘ɺ
 ػೳʹରͯ͠ͷ୲౰ऀΛஔ͘͜ͱ͕Ͱ͖Δ ◦ ։ൃऀ͕ػೳͷ࣮ݱʹ੹೚Λ࣋ͪ΍͘͢ͳΔ 24

  25. FlutterΛ࠾༻͢ΔϦεΫ΍՝୊ͷݕূ • Flutterͷ࠾༻Ͱൃੜ͢Δ՝୊ʹؾͮ͘͜ͱ͕Ͱ͖Δ ◦ ϏδωεతʹɺωΠςΟϒͷSDKʹڧ͘ґଘ͍ͯ͠Δ͔΋ ◦ ΞϓϦέʔγϣϯతʹɺύϑΥʔϚϯε͕ඇৗʹγϏΞ͔΋ ◦ ։ൃνʔϜతʹɺFlutterΛֶͿ͜ͱ͕೉͍͔͠΋ 25

  26. Add-to-appͷσϝϦοτ 26

  27. Add-to-appͷσϝϦοτ • FlutterΞϓϦέʔγϣϯͱͷৼΔ෣͍ࠩҟ • Add-to-appͷΞοϓσʔτ஗Ε • Ϗϧυ࣌ؒ΍(໰୊ൃੜ࣌ͷ)ௐࠪίετ૿Ճ 27

  28. FlutterΞϓϦέʔγϣϯͱͷৼΔ෣͍ࠩҟ • Flutter EngineͷΩϟογϡʹΑΔӨڹ ◦ Ωϟογϡ͢ΔͱʰAdd-to-appͷView͕දࣔ͞Ε͍ͯͳ͍ʱ࣌ɺ
 Add-to-appͷView͕อ࣋͞ΕΔΑ͏ʹͳΔ ◦ ը໘Λดͯ͡΋dispose͞Εͳ͍ͷͰɺঢ়ଶ؅ཧʹ޻෉͕ඞཁ •

    Ωϟογϡ͕ͳ͚Ε͹໰୊͸·ͣੜ͡ͳ͍ ◦ Ωϟογϡ͠ͳ͍৔߹͸ɺ্ཱ͕ͪ͛࣌ؒ஗͘ͳΔ 28
  29. Add-to-appͷΞοϓσʔτ஗Ε • Flutter޲͚ʹ։ൃ͞Εͨػೳ͕ɺAdd-to-appʹ൓ө͞ΕΔͷ͕஗͍ ◦ ίʔυςϯϓϨʔτͳͲɺݟಀ͞Ε͕ͪͳ఺͕஗Ε΍͍͢ ◦ Add-to-app಺Ͱݹ͍Kotlinʹґଘ͢ΔPluginΛར༻͢Δͱɺ
 ϏϧυͰ͖ͳ͍໰୊ͳͲ͕ൃੜ͢Δ͜ͱ͕͋Δ ▪ https://github.com/flutter/flutter/issues/100613

    29
  30. Ϗϧυ࣌ؒ΍ௐࠪίετͷ૿Ճ • Add-to-appΛಋೖ͢Δ͜ͱͰɺ໌֬ʹϏϧυ͕࣌ؒ૿Ճ͢Δ ◦ ґଘϥΠϒϥϦ͕૿͑Δ ◦ ΞϓϦέʔγϣϯαΠζ΋૿Ճ͢Δ • ෆ۩߹ௐ͕ࠪ೉͍͠έʔε͕ଘࡏ͢Δ ◦

    ωΠςΟϒAPIΛར༻͍ͯ͠Δέʔε ◦ AndroidɺiOSͷͲͪΒ͔ͷΈͰൃੜ͢Δέʔε 30
  31. Add-to-appͷઓ͍ํ 31

  32. Add-to-appͷઓ͍ํ • લఏ৚݅Λݕ౼͢Δ • ࡟ݮίετͱ૿ՃίετΛ೺Ѳ͢Δ • Add-to-appͷະདྷΛ࡞Δ 32

  33. લఏ৚݅Λݕ౼͢Δ • Add-to-app͕༗ޮͳέʔεʹ֘౰͍ͯ͠Δ͔ ◦ AndroidɺiOS޲͚ͷطଘΞϓϦ͕͋Δ͔ ◦ ෳ਺ϓϥοτϑΥʔϜ޲͚ͷ։ൃ͕ɺෛ୲͔Ͳ͏͔ • νʔϜϏϧσΟϯά͕໨తͷ৔߹͸ɺҰߟͷ༨஍͋Γ 33

  34. ࡟ݮίετͱ૿ՃίετΛ೺Ѳ͢Δ • ࡟ݮίετ ◦ ։ൃ޻਺ɺFlutterͰ։ൃͨ͠ػೳͷݕূ޻਺ ◦ ։ൃʹؔΘΔίϛϡχέʔγϣϯͷෛ୲ • ૿Ճίετ ◦

    ΞϓϦέʔγϣϯαΠζɺϏϧυ࣌ؒ ◦ FlutterͷֶशɺAdd-to-appͷΩϟονΞοϓ 34
  35. Add-to-appͷະདྷΛ࡞Δ • Add-to-appͷχʔζ͕͋Δ͜ͱΛࣔ͞ͳ͚Ε͹ͳΒͳ͍ ◦ Add-to-app׆༻ࣄྫͷެද΍ɺΞϯέʔτͰͷճ౴ ◦ GitHub Issueͷ࡞੒΍upvoteʹΑΔҙࢥͷද໌ • Add-to-app͸ܾͯ͠ओྲྀʹͳΒͳ͍ٕज़

    35
  36. Add-to-appͷະདྷΛ࡞Δ • Add-to-appͷχʔζ͕͋Δ͜ͱΛࣔ͞ͳ͚Ε͹ͳΒͳ͍ ◦ Add-to-app׆༻ࣄྫͷެද΍ɺΞϯέʔτͰͷճ౴ ◦ GitHub Issueͷ࡞੒΍upvoteʹΑΔҙࢥͷද໌ • Add-to-app͸ܾͯ͠ओྲྀʹͳΒͳ͍ٕज़

    ◦ ͋͘·Ͱ΋ա౉ظʹར༻͢Δ΋ͷͱଊ͑Δ΂͖ 36
  37. ·ͱΊ • Add-to-appͷ࠾༻ͷ໨తΛ໌֬ʹ • Flutter͕։ൃ͢ΔΞϓϦέʔγϣϯʹ߹க͢Δ͔͸ཁݕূ ◦ Add-to-appͰখ࢝͘͞ΊΔͷ͸ྑ͍બ୒ ◦ Add-to-appʹΑΔίετ૿͸༧Ίݕ౼͓ͯ͘͠΂͖ •

    Add-to-app͸ศར͕ͩɺ࠷దͳબ୒ࢶͱ͸ݶΒͳ͍ ◦ Add-to-appΛղফ͢Δܭը͸ཱͯͨํ͕ྑ͍ • Add-to-appͷ࠾༻ࣄྫ΍஌ݟͷڞ༗͸ੵۃతʹ 37
  38. Thanks! 38