Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
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.1k
PickGo_for_Partnerの移行方法から学ぶ_既存のネイティブアプリをFlutterへリプレイスする方法_.pdf
entaku
September 17, 2021
Tweet
Share
More Decks by entaku
See All by entaku
AVAudioSessionの全体像を掴む.pdf
entaku
0
38
Core_Audio徹底解剖.pdf
entaku
4
200
わたしと今年のSwift.pdf
entaku
1
130
個人開発をTCAで運用していくということ.pdf
entaku
0
23
パッケージ管理でモバイル開発を安全に進める.pdf
entaku
0
520
個人開発をTCAで運用していくということ.pdf
entaku
0
830
技術コミュニティで技術書典出してみた.pdf
entaku
0
45
TCAでiOS開発を_学ぶ3つの利点.pdf
entaku
4
160
What_s_new_in_voice_processing他What_s_new_in_Audio.pdf
entaku
1
180
Featured
See All Featured
For a Future-Friendly Web
brad_frost
175
9.4k
A Tale of Four Properties
chriscoyier
156
23k
Side Projects
sachag
452
42k
Building Adaptive Systems
keathley
38
2.3k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Designing for Performance
lara
604
68k
A Modern Web Designer's Workflow
chriscoyier
693
190k
The World Runs on Bad Software
bkeepers
PRO
65
11k
How to Ace a Technical Interview
jacobian
276
23k
Building Your Own Lightsaber
phodgson
103
6.1k
Code Reviewing Like a Champion
maltzj
520
39k
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ͰͷػೳΛཧղ͍ͯ͠Εͳ͍ • Ϣʔβʔςετ࣮ࢪ͢Δ
• ༷͕Θ͔Βͳ͍߹ಛʹʂ