Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
PickGo_for_Partnerの移行方法から学ぶ_既存のネイティブアプリをFlut...
Search
entaku
September 17, 2021
2
4.3k
PickGo_for_Partnerの移行方法から学ぶ_既存のネイティブアプリをFlutterへリプレイスする方法_.pdf
entaku
September 17, 2021
Tweet
Share
More Decks by entaku
See All by entaku
Swiftでもいろんな文字_の読み上げをしたい__.pdf
entaku
0
93
AVAudioSessionの全体像を掴む.pdf
entaku
0
140
Core_Audio徹底解剖.pdf
entaku
4
370
わたしと今年のSwift.pdf
entaku
1
180
個人開発をTCAで運用していくということ.pdf
entaku
0
54
パッケージ管理でモバイル開発を安全に進める.pdf
entaku
0
1k
個人開発をTCAで運用していくということ.pdf
entaku
0
1.3k
技術コミュニティで技術書典出してみた.pdf
entaku
0
95
TCAでiOS開発を_学ぶ3つの利点.pdf
entaku
4
230
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
690
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.8k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
Building an army of robots
kneath
306
46k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Git: the NoSQL Database
bkeepers
PRO
432
66k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
BBQ
matthewcrist
89
9.9k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Transcript
PickGo for PartnerͷҠߦํ๏͔ ΒֶͿ طଘͷωΠςΟϒΞϓϦ ΛFlutterϦϓϨΠε͢Δํ๏ iOSDC 2021 2021/09/17 18:30ʙ
Track D
ࣗݾհ • Name: ԕ౻ (entaku) • Twitter: @entaku_0818 • GitHub:
entaku0818 • Job: iOS/Android ΤϯδχΞetc
https://cb-cloud.com/
࣍ • ͳͥFlutterʹϦϓϨΠεͨ͠ͷ͔ʁ • FlutterϦϓϨΠε·Ͱͷεςοϓ • Ҡߦલʹཱ͔ͪͩͬͨ • FlutterϦϓϨΠεͷৼΓฦΓ •
·ͱΊ
ͳͥFlutterʹϦϓϨΠεͨ͠ͷ ͔ʁ
iOS/Androidͷ྆OSఏڙ্͍ͯ͘͠ ͰɺٻΊΒΕΔ։ൃεϐʔυʹ߹Θͳ͍ • Partner͞Μ͕͓ࣄͰ͏ΞϓϦͳ ͷͰɺαϙʔτΛߟ͑Δͱಉ࣌ʹϦ Ϧʔε͢Δඞཁ͕͋Δ • ྆ϦϦʔεͷ࣌ظΛ߹ΘͤΑ͏ͱࢥ͏ ͱσβΠϯͷҧ͍/։ൃڥͷҧ͍/ݴ ޠڥͷҧ͍ΛຒΊΔඞཁ͕͋Γɺࢥ
͏Α͏ͳ։ൃεϐʔυ͕ग़ͤͳ͍
৽͍͠ࢪࡦπʔϧͷಋೖʹ࣌ ͕͔͔ؒͬͯ͠·͏ • PickGo for Partner2015ʹϦ Ϧʔε͞ΕͨΞϓϦͰ͋Γɺឯ༨ۂ ં༷͋ͬͨͦΕΛ࣮ݱ͢Δίʔ υͳͲͷٕज़తෛ࠴͕͋Γ·ͨ͠ɻ ࠓճͷϦϓϨΠεΛߦ͏͜ͱͰɺෛ
࠴Λཧ͘͢͠͠ɺ։ൃεϐʔυ Λ্͍͛ͯ͘ૂ͍͕͋Γ·ͨ͠ɻ
ද͕ॻ͍ͨίʔυ͕·ͩͬ ͯΔ
https://pickgo.town/shopping/ ଞαʔϏεͰͷಋೖ࣮͕͋ͬͨ
FlutterԽ ͩ!
ٕज़ߏ Anjular Scala Rails • NativeͷػೳϩάΠϯ৽نը໘Ͱ͍͔ͭ͋͘Δͷ ͷϝΠϯͷಋઢWebViewͰAnjularͷը໘Λදࣔ
࣮͋ΔFlutterͷߏΛ࠾༻ • ChangeNoti fi er + ChangeNoti fi erProviderΛ͏ •
ViewσʔλΛࢀর͠දࣔ • ViewModelChangeNoti fi erProviderΛར༻͠ɺσʔλͷมߋΛݕ͢Δ • State(ChangeNoti fi er)σʔλͷมߋΛ௨͢Δ
FlutterϦϓϨΠε ·Ͱͷεςοϓ
։ൃฤ
ॳظը໘ͷ࡞ • ϩάΠϯը໘ͱϗʔϜը໘Λ࡞ • ϩάΠϯͨ݁͠Ռฦͬͯ͘ΔtokenΛCookieηοτ͠ WebviewͰύʔτφʔWebը໘Λ։͘ͱ͍͏͜ͱΛ͠·ͨ͠
ଞωΠςΟϒػೳͷ࡞ • ొಋઢMapҊ݅ҰཡͳͲωΠςΟϒػೳΛFlutterͰ ࡞͠·ͨ͠
Native࿈ܞՕॴͷ࡞ • WebViewͰಛఆͷૢ࡞Λͨ͠ࡍʹFlutterଆͰॲཧΛߦ͍·ͨ͠ • ϩάΞτॲཧ • ిىಈ • Ґஔใ࿈ܞ •
εΫϦʔϯγϣοτ • GoogleMapىಈ
Push௨ • PickGo Ͱ࠷৽ͷҊ݅ΛPush௨Ͱૹ৴͢ΔॲཧΛ͓ͯ͠ ΓFlutterͰಉ༷ͷॲཧΛ࣮͠·ͨ͠ • ࠓ·ͰOneSignalΛ͍ͬͯ·͕ͨ͠ɺ͠ΕͬͱFirebase ʹҠߦ͠·ͨ͠ʢଞαʔϏεͰFirebaseʹ͍ͯͨͨ͠Ίʣ
ϦϦʔεฤ
৴ͷΈΛ͑Δ ݕূํ๏ͷ༰қੑΛ্͛Δ ҠߦલʹQAνʔϜʹΑΔQAΛ࣮ ࢪͨ͠Γɺࣾһޙड़ͷϢʔβʔ ςετΛ࣮ࢪ্͍ͯ͘͠Ͱݕূͷ ༰қੑΛ্͍͛ͯ͘͜ͱ͕ඞཁͰ ͨ͠ɻ https://codemagic.io/apps
৴ͷΈΛ͑Δ ͦ͜ͰcodemagicΛಋೖ͠ɺ͜ Ε·ͰΞϓϦΤϯδχΞʹϏϧ υΛͯ͠ΒΘͳ͍ͱͰ͖ͳ͔ͬ ͨݕূΛ༰қʹ͢Δ͜ͱͰɺ࣭ ݕূͷ༰қੑΛ্ͤ͞·ͨ͠ɻ https://codemagic.io/apps
͍͟ϦϦʔε
ͱͯා͍
ͳͥා͍ͷ͔ʁ • 5ఔαʔϏεఏڙ͖ͯͯ͠ࠓճ͕ॳͷϦϓ ϨΠε • ༷ΛશʹѲ͍ͯ͠ΔΘ͚Ͱͳ͘ෆ֬ ࣮ੑ͕ߴ͍
Ϣʔβʔςετ ͩ!
Ϣʔβʔςετͷ࣮ࢪ • iOS/AndroidͰͦΕͧΕ2໊ͣͭύʔτφʔ͞ Μʹ͝ڠྗ͍͖ͨͩςετΛ࣮ࢪ • ઌߦϦϦʔεͯ͠2िؒఔ৮ͬͯΒ͍ ൃੜ͠ͳ͍͔֬ೝͯ͠Β͏
Ϣʔβʔςετͷ࣮ࢪ • ຖ࿈བྷ…ͱ·Ͱ͍͖·ͤΜͰ͕͔ͨ͠ͳΓ ͷසͰ࿈བྷͯ͠ݕূʹڠྗͯ͠Β͍·ͨ͠
Ϣʔβʔςετͷ࣮ࢪ݁Ռ • ͷݕ • ϓογϡ௨ॲཧͷ࣮࿙Ε • ෳγεςϜ͔ΒPush௨Λ͍ͯͨͨ͠Ίؾ͚ͮͳ͔ͬͨ • ύεϫʔυϦηοτಋઢͷՃ •
FlutterԽ͢ΔλΠϛϯάͰશͯͷϢʔβʔ͕ϩάΞτ ͢ΔͨΊՃ • ࠓ·Ͱཧऀ͕Ϧηοτ͍ͯͨ͠ • ʢݫີʹΫϩʔζυςετલʹؾ͕͍ͭͯमਖ਼͠·͠ ͨʣ • େ͖͍ى͜Βͳͯ҆͘৺ͨ͠
͍ͭʹϦϦʔε!
ϦϓϨΠεͷ࣮ࢪ݁Ռ • 4/26 ϦϦʔε 🎉 • όʔδϣϯ9.0.1 • Android͕8.0.0ͩͬͨͷͰ߹Θͤ·ͨ͠ •
iOS - https://apps.apple.com/JP/app/id1053791248 • Android - https://play.google.com/store/apps/details? id=ryuichi.cbcloud.keitownfc
ϦϓϨΠεޙͷ • ಛఆछྨͷૹҊ݅ͷҊ݅௨͕ೖΒͳ͍ • ϚοϓΛ։͘ͱɺϒϥβ্ཱ͕͕ͪΓΞϓ Ϧ֎ʹඈ͞ΕΔ • ʮҐஔใ͕औಘͰ͖·ͤΜͰͨ͠~ʯͷΤ ϥʔ
ϦϓϨΠεޙͷมԽ • ϦϦʔεճ͕5ճˠ8ճʹͳͬͨ • ϦϓϨΠεલܰඍͳมߋ͕ͩͬͨɺϦϦʔ εޙ৽ػೳؚΊͯ8ճ
ৼΓฦΓ
ΫϩεϓϥοτϑΥʔϜͷۤ खҙࣝ • ݁ہωΠςΟϒଆͰSwift/KotlinΛॻ͔ͳ͚Ε͍ ͚ͳ͍ • ͳΒ࠷ॳ͔ΒωΠςΟϒͰྑ͍͡ΌΜͱࢥͬͯͨ
https://pickgo.town/shopping/
ҰFlutterΛಋೖͯͨ͜͠ͱʹ Αͬͯߟ͑ํ͕มΘͬͨ • APIͰCRUDૢ࡞ͯ͠ɺUIΛදࣔͤ͞Δ͚ͩͳΒͱͯ ؆୯Ͱૣ͍ • ΞϓϦͰར༻͢Δʢ͔͠Εͳ͍ʣωΠςΟϒͰར ༻͢ΔػೳΛ͔ͬ͠ΓཧͰ͖Εɺͳ͍ݟࠐ Έ͕Ͱ͖ͨ •
ࣄલʹ༧ଌ͖͠Εͳ͔ͬͨ͜ͱ • ΫϩʔζυςετͦΕʹ͏मਖ਼ʹΑΓ༧ఆΑΓ1ϲ݄ ͘Β͍Εͯ͠·ͬͨ • ϦϓϨΠεͷςετେม • FlutterϥΠϒϥϦ͕αϙʔτ͞Εͯͳ͍SDK͋ΔͷͰ ϓϥάΠϯΛ࡞͢Δඞཁ͕͋ͬͨ •
ଞͷ։ൃऀ͔Β w 'MVUUFSίʔυඳ͍࣮ͯ͢ΔͷͰށ͍͕ ͋Γ·ͨ͠ CZJ04ΤϯδχΞ w ָ͍ͬͯͯ͠Ͱ͢ʂ w EBSU͕ඳ͖ͮΒ͍ͳͬͯࢥͬͨ
w J04,PUMJOΤϯδχΞͰ͋Ε'MVUUFSܦݧ ऀ͡Όͳͯ͘େৎͰͨ͠
ࠓޙͷల • ػೳͷશͯΛFlutter • WebViewͰૢ࡞͕ॏ͍෦ଟ͍ͷͰɺNativeԽΛؤ ு͍͖͍ͬͯͨ • ঢ়ଶཧͷख๏Λཱ֬͢Δ • ࣮Λ༏ઌ͋͠·Γେ͖͍มߋΛͰ͖ͳ͔ͬͨ
• RiverpodͳͲͷಋೖΛݕ౼
ࢀߟ:ओͳར༻ϥΠϒϥϦ • WebView • https://pub.dev/packages/ fl utter_inappwebview • Ґஔใऔಘ •
https://pub.dev/packages/background_locator • ϓογϡ௨/crashlyticsͳͲ • https://pub.dev/packages/ fi rebase_core • APIClient • https://pub.dev/packages/retro fi t
·ͱΊ • ࠓ·ͰSwift / KotlinͰར༻͍ͯͨ͠ΞϓϦ FlutterϦϓϨΠεͰ͖Δ • NativeͰͷػೳΛཧղ͍ͯ͠Εͳ͍ • Ϣʔβʔςετ࣮ࢪ͢Δ
• ༷͕Θ͔Βͳ͍߹ಛʹʂ