$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Cookpad TechConf 2019 〜霞が関〜 クックパッドiOSアプリの 破壊と創造...
Search
giginet
PRO
February 27, 2019
Technology
14
7k
Cookpad TechConf 2019 〜霞が関〜 クックパッドiOSアプリの 破壊と創造、そして未来
https://techconf.cookpad.com/2019/
giginet
PRO
February 27, 2019
Tweet
Share
More Decks by giginet
See All by giginet
Creating Intuitive Developer Tool in Swift
giginet
PRO
0
1k
Mergeable Libraryで 高速なアプリ起動を実現しよう!
giginet
PRO
2
4.3k
5分でわかるExplicitly Built Modules
giginet
PRO
0
610
Introduction for Open Source Swift Workshop
giginet
PRO
0
1.5k
Swift Packageを使った 巨大な依存グラフのキャッシュ戦略
giginet
PRO
5
5k
Deep Dive into Mergeable Library
giginet
PRO
1
1.8k
Go beyond the Actor Boundary ~ Swift 6へのConcurrency対応 ~
giginet
PRO
1
3.4k
新しいビルドツールScipioのご紹介
giginet
PRO
3
1.1k
ポケモンで学ぶiOS 16弾丸ツアー 🚅
giginet
PRO
1
940
Other Decks in Technology
See All in Technology
LY Accessibility Guidelines @fukuoka_a11yconf_前夜祭
lycorptech_jp
PRO
1
140
「今までで一番学びになった瞬間」発表 LT - Shinjuku.rb #96
kozy4324
0
140
システムリプレイスプロジェクト発足から7年、改めてコスト最適化に向き合う / replace and cost optimization
takumi
1
400
Explain EXPLAIN
keiko713
9
2.3k
開志専門職大学特別講義 2024 デモパート
1ftseabass
PRO
0
210
検証と資産化を形にするプロダクト組織へ/tapple_pmconf2024
corin8823
1
7.2k
How is Cilium Tested?
yutarohayakawa
5
200
乗っ取れKubernetes!!~リスクから学ぶKubernetesセキュリティの考え方~/k8s-risk-and-security
mochizuki875
3
450
品質管理チームのEMとして大事にしていること / QA EM
nihonbuson
0
420
そろそろOn-Callの通知音について考えてみよう (PagerDuty編)
tk3fftk
1
320
論理レプリケーションを使ったDB統合
kkato1
0
120
MediaPipe と ML Kit ってどう ちがうの? / What is the difference between MediaPipe and ML Kit?
yanzm
0
430
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Faster Mobile Websites
deanohume
305
30k
GraphQLとの向き合い方2022年版
quramy
44
13k
How STYLIGHT went responsive
nonsquared
95
5.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Making Projects Easy
brettharned
116
5.9k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.3k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Designing for Performance
lara
604
68k
Building an army of robots
kneath
302
43k
Optimizing for Happiness
mojombo
376
70k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Transcript
@giginet ϞόΠϧج൫෦ ʙբ͕ؔʙ ΫοΫύουiOSΞϓϦͷ ഁյͱɺͦͯ͠ະདྷ
2 ࠷ॳͷίϛοτ ݄ ݱࡏ·Ͱͷίϛοτ ϦϦʔεස िճ ϦϦʔεลΓͷ։ൃऀ d
૯ίʔυߦ ˞ݱࡏͷίʔυϕʔεʹҠߦޙ
3 ։ൃऀ͝ͱͷ1ͷྦྷੵϏϧυ࣌ؒ 1h 1.5h
4 27% 73% 155,000ߦ 58,700 ߦ Objective-C Swift
՝ 5 •1ྦྷੵ1࣌ؒ/ਓΛ্ճΔϏϧυ࣌ؒ •ࠓͳ͓25%͋ΔObjective-C •ϝϯς͞Εͯͳ͍ػೳ •ີ݁߹ա͗ͯͲ͔͜ม͑ΔͱյΕΔ
6 բ͕ؔ IUUQTKBXJLJQFEJBPSHXJLJ&##%&#$"&"%#&#"#&"
բ͕ؔͷత 7 •ίʔυཧ •Objective-Cͷഁյ •Ϗϧυ࣌ؒͷվળ
ཧ 8 .PEVMFT %ZOBNJD'SBNFXPSL "QQMJDBUJPO
ݱ࣮
ϚϧνϞδϡʔϧԽ 10 •Ωϟογϡ͕ޮ͖ɺ։ൃ࣌ͷϏϧυߴԽ •ݹ͍࣮ͷӅṭ •ը໘ؒΛૄ݁߹ʹͰ͖Δ
Objective-C Bridging 11 11 MyApp-Bridging-Header.h MyApp-Swift.h
բ͕ؔͷΰʔϧ 12 •։ൃऀͷखݩͷϏϧυ࣌ؒΛ130ҎʹೲΊΔ •Objective-CΛશʹফ͠ڈΔ
։ൃऀͷੜ࢈ੑΛ ͳΜͱ͔͢Δͷ͕ բ͕ؔ
View Model ViewController
15 View Model ViewController ϩδοΫΛ࣋ͭ7JFX XXXManager γϯάϧτϯͷσʔλιʔε .BTTJWF7JFX$POUSPMMFS ڞ௨Խ͞ΕͯංେԽͨ͠Ϟσϧ ☠
σουίʔυ ີ݁߹ 7JFXͷܧঝɺ͍ճ͠ ৮ͬͯ ͍͚ͳ͍ͭ ࠞಱ
DataStore UseCase Presenter ViewBuilder View Wireframe Entity DataStore Entity UseCase
Interactor Presentation Layer Domain Layer Data Layer Repository $PPLQBE7*1&3
17 Tsukuru Cookpad 7*1&3ԽҎલͷ.7$ 0CKFDUJWF$ 4XJGUͷࠞࡏ 7*1&3Խޙͷը໘ͷू߹ 4XJGU ɾɾɾ ࠞಱ
Cookpad
18 Tsukuru Cookpad 7*1&3ԽҎલͷ.7$ 0CKFDUJWF$ 4XJGUͷࠞࡏ 7*1&3Խޙͷը໘ͷू߹ 4XJGU ɾɾɾ 7*1&3ΞϓϦέʔγϣϯ
Cookpad
طଘͷΞʔΩςΫνϟΛ ੜ͔ͨ͠ ϚϧνϞδϡʔϧԽ
20
21 YAML yonaskolb/XcodeGen ࣗಈੜ
22 ৽نλʔήοτ
23 targets: CookpadCore: type: framework platform: iOS sources: - CookpadCore
settings: base: PRODUCT_BUNDLE_IDENTIFIER: com.cookpad.CookpadCore scheme: testTargets: - CookpadCoreTests dependencies: - sdk: Foundation.framework - carthage: Result - carthage: RxCocoa - carthage: RxSwift
24 σΟϨΫτϦߏʹΑΓ ॴଐ͢ΔϏϧυλʔήοτ͕ อূ͞ΕΔ
xcodeprojΛഁյͨ͠Β Ϟδϡʔϧಋೖ͕༰қʹ
ϚϧνϞδϡʔϧͷ ಋೖ 26
բ͕ؔͷίϯηϓτ 27 •େ͖ͳॻ͖͑Λڧ੍͠ͳ͍ •Objective-CΛ࣋ͪࠐ·ͤͳ͍ •࣮ৄࡉVIPERΞϓϦέʔγϣϯʹӅṭ
բ͕ؔͷίϯηϓτ 28 •େ͖ͳॻ͖͑Λڧ੍͠ͳ͍ •Objective-CΛ࣋ͪࠐ·ͤͳ͍ •࣮ৄࡉVIPERΞϓϦέʔγϣϯʹӅṭ
բ͕ؔͷίϯηϓτ 29 •େ͖ͳॻ͖͑Λڧ੍͠ͳ͍ •Objective-CΛ࣋ͪࠐ·ͤͳ͍ •࣮ৄࡉVIPERΞϓϦέʔγϣϯʹӅṭ
30 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C
31 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C
32 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C
33 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C
34 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C
35 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C ந
36 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C Environment ۩ମతͳ࣮ ΠϯλʔϑΣΠεͷΈΛఏڙ
37 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C Environment բ͕ؔήʔτΣΠ
38 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C Bridging HeaderΛ ࣋ͨͳ͍
39 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C Objective-C Bridge ΞϓϦͰ͚ͩ࣋ͭ
Objective-CΛ Έతʹഉআ SwiftԽͷ༏ઌॱҐΛՄࢹԽ
41 Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature B Feature
C Ӆṭ͍ͨ͠
42 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C Environment ΠϯλʔϑΣΠεͷΈΛఏڙ
43 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C Environment ݹ͍ϥΠϒϥϦͷґଘ ΞϓϦͷΈ͕࣋ͭ ۩ମతͳ࣮
44 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C Environment ݹ͍ϥΠϒϥϦͷґଘ ΞϓϦͷΈ͕࣋ͭ ۩ମతͳ࣮ ػೳͷ։ൃ࣌ʹݹ͍ϥΠϒϥϦΛ ҙࣝ͠ͳͯ͘ࡁΉΑ͏ʹ
45 APIClient.share Cookpad Tests 45 Method Swizzling API Stub
46 Environment CookpadEnvironment TestingEnvironment Cookpad Tests Network Logger ը໘ભҠ
47 CookpadCore CookpadComponent Cookpad ɾɾɾ Cookpad Tsukuru Feature A Feature
B Feature C Ҡߦத Ҡߦத
՝ 48 Bundle Dynamic Linking Time Tsukuruશഁյ Feature moduleҠߦ Ϟδϡʔϧؒͷґଘ
దͳϞδϡʔϧׂ୯Ґ ։ൃ৫ͷεέʔϧ Objective-Cશഁյ
͝ਗ਼ௌ ͋Γ͕ͱ͏͍͟͝·ͨ͠ !HJHJOFU