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.2k
PickGo_for_Partnerの移行方法から学ぶ_既存のネイティブアプリをFlutterへリプレイスする方法_.pdf
entaku
September 17, 2021
Tweet
Share
More Decks by entaku
See All by entaku
AVAudioSessionの全体像を掴む.pdf
entaku
0
56
Core_Audio徹底解剖.pdf
entaku
4
240
わたしと今年のSwift.pdf
entaku
1
130
個人開発をTCAで運用していくということ.pdf
entaku
0
29
パッケージ管理でモバイル開発を安全に進める.pdf
entaku
0
580
個人開発をTCAで運用していくということ.pdf
entaku
0
960
技術コミュニティで技術書典出してみた.pdf
entaku
0
52
TCAでiOS開発を_学ぶ3つの利点.pdf
entaku
4
180
What_s_new_in_voice_processing他What_s_new_in_Audio.pdf
entaku
1
200
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
133
9k
Being A Developer After 40
akosma
89
590k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Rails Girls Zürich Keynote
gr2m
94
13k
Facilitating Awesome Meetings
lara
51
6.2k
Writing Fast Ruby
sferik
628
61k
GraphQLとの向き合い方2022年版
quramy
44
13k
BBQ
matthewcrist
85
9.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Designing for humans not robots
tammielis
250
25k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
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ͰͷػೳΛཧղ͍ͯ͠Εͳ͍ • Ϣʔβʔςετ࣮ࢪ͢Δ
• ༷͕Θ͔Βͳ͍߹ಛʹʂ