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
Mercari iOSにおける きらやばArchitectureとAutomation
Search
kagemiku
November 22, 2019
Technology
0
1.6k
Mercari iOSにおける きらやばArchitectureとAutomation
kagemiku
November 22, 2019
Tweet
Share
More Decks by kagemiku
See All by kagemiku
WWDC20 Recap of SwiftUI & Combine
kagemiku
0
4.8k
WWDC19 Recap of ML
kagemiku
0
650
Other Decks in Technology
See All in Technology
日本の AI 開発と世界の潮流 / GenAI Development in Japan
hariby
1
520
Claude Skillsの テスト業務での活用事例
moritamasami
1
110
Snowflake Industry Days 2025 Nowcast
takumimukaiyama
0
130
Amazon Quick Suite で始める手軽な AI エージェント
shimy
2
2k
Amazon Bedrock Knowledge Bases × メタデータ活用で実現する検証可能な RAG 設計
tomoaki25
6
2.5k
まだ間に合う! Agentic AI on AWSの現在地をやさしく一挙おさらい
minorun365
18
2.9k
技術選定、下から見るか?横から見るか?
masakiokuda
0
110
MySQLのSpatial(GIS)機能をもっと充実させたい ~ MyNA望年会2025LT
sakaik
0
150
NIKKEI Tech Talk #41: セキュア・バイ・デザインからクラウド管理を考える
sekido
PRO
0
230
投資戦略を量産せよ 2 - マケデコセミナー(2025/12/26)
gamella
0
490
ペアーズにおけるAIエージェント 基盤とText to SQLツールの紹介
hisamouna
2
1.7k
2025-12-27 Claude CodeでPRレビュー対応を効率化する@機械学習社会実装勉強会第54回
nakamasato
4
1.2k
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
400
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
Writing Fast Ruby
sferik
630
62k
Building Adaptive Systems
keathley
44
2.9k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
180
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
How to make the Groovebox
asonas
2
1.9k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Transcript
1 Mercari iOSにおける きらやばArchitectureとAutomation Akira Fukunaga (@kagemiku) iOS Engineer 2019/11/25
2 Today’s Outlines 01 • 自己紹介 02 03 • MercariにおけるiOS
Engineer • きらやばArchitectureとAutomation
3 01 自己紹介
4 Akira Fukunaga (@kagemiku) Software Engineer (iOS) Tech Lead at
NewBiz & Category
5 人生 学校 Mercari 東京工業大学 情報理工学院 2018.04 休学 2018.07 退学
2019.03 Merpay Integration 2018.08 (サマーインターン) Merpay Integration 2018.09 - 2019.02 (内定者インターン) 退学旅行 2019.03 新卒入社 2019.04 New Customer Growth 2019.07 - 09 NewBiz 2019.10 - (Tech Lead)
6 • Merpay Integration (2018.08 - 2019.02) ◦ メルカリアプリへのメルペイ導入を行うチーム ▪
サイドメニュー撤廃 & 下タブ導入 ▪ マイページ追加 ▪ タイムラインUIの変更 ▪ その他、必要な作業すべて ... • (Sub) Developer Menu Rearchitecture ◦ 社内向けの開発者機能の Rearchitecture (後述) ◦ Objc-C && 1 Storyboard でやばかったので勝手にやった インターン時代 (2018.08 - 2019.02)
7 • New Customer Growth (2019.07 - 2019.09) ◦ 新規お客様向けの施策チーム
▪ 新規会員登録 ▪ 各種オンボーディング ▪ まだ A/B テスト段階のため、詳細は割愛 • NewBiz & Category (2019.10 - ) ◦ 新規領域の開拓やカテゴリ特化を行う施策チーム ▪ 絶賛新機能開発中 ◦ iOSのTech Lead 新卒入社後 (2019.04 -)
8 02 MercariにおけるiOS Engineer
9 • お客様に機能を届ける最後のまとめ役 ◦ どんなに良いUI DesignやMLのモデルがあっても クライアントアプリに落とし込まないとお客様へは届けられない ◦ スーパー大事 •
バックグラウンド・国籍は様々 ◦ 現在は全員で27人ほど (Mercari JPのみ) ◦ PR・Slack・Document 全てにおいて英語 iOS Engineerについて
10 チーム構成 mercari-ios Productivity Technical Problems Architect Client Feature1 Feature1
Feature1 Feature1 Feature N CI & CD
11 チーム構成 mercari-ios Productivity Technical Problems Architect Client Feature1 Feature1
Feature1 Feature1 Feature N CI & CD 20数人で同時に 開発、無理では
12 03 きらやばArchitectureとAutomation
13 03 きらやばArchitectureとAutomation
14 きらやばArchitecture = MVVM + μVC + Store (※僕が勝手にそう呼んでるだけです )
15 MVVM ViewController (VC) ViewModel Model
16 MVVM + μVC VC View Model Model View Model
View Model View Model VC VC VC
17 MVVM + μVC VC VC μVC μVC μVC VC
μVC μVC Component oriented architecture, like React
18 MVVM + μVC
19 • Rearchitectureチームの発足とコードベースの刷新 (2018年) ◦ iOSエンジニアが100人体制になっても スピードを落とさずに開発できるようなコードベースを作る ◦ 現在はその役割の一部を Architectチームが担う
◦ 共同開発でありがちな XIB(View)ファイルのconflictを見ることはほぼなくなった ◦ 事実として、現在20数人が同時に一つのアプリを開発できている => ✅成功 • 参考 ◦ メルカリJP初のiOSリアーキテクチャは、なぜ「最高に楽しい」のか ◦ MicroViewControllerで無限にスケールするiOS開発 - iOSDC 2018 MVVM + μVC
20 MVVM + μVC VM VM VM VM VM VM
VM VM State State State State State State State State Each VM has own State It’s hard to pass state changes to other VMs...
21 MVVM + μVC + Store Root VM VM VM
VM VM VM VM VM State Store Dispatcher Action Introduce Store like Flux own
22 Architectureの歴史 2013: Pure MVC (Objc-C) 2014: Pure MVC (Objc-C)
2015: Pure MVC, heading to MVVM (Objc-C) 2016: MVVM (Objc-C + Swift) 2017: MVVM (Objc-C + Swift) 2018: MVVM + μVC (Swift) 2019: MVVM + μVC + Store (Swift) 2020: heading to SwiftUI + Combine… Swift SwiftUI
23 きらやばArchitecture = MVVM + μVC + Store (※僕が勝手にそう呼んでるだけです )
24 03 きらやばArchitectureとAutomation
25 Automation 一ヶ月で約665 commitsが developに入る develop branchとのconflict解 決がやばいのでは
26 Automation (GitHub Label) • In House Dev ◦ 内製のバイナリ配布システムにより
commit されるたび自動配布 • Nightly Merge ◦ 自動的にdevelopのmergeを行うPRを毎 晩作成する • Auto Merge ◦ CIが終わり次第、自動で mergeする
27 • Nightly Merge + Auto Mergeの組み合わせが強力 ◦ CIがNightly Merge
PR作成時に、conflictがない場合は自動で mergeする ◦ 朝会社に来ると 「feature branchは既に最新のdevelop branchに追従した状態」になっている ◦ つまり、勝手にdevelop branchとの差分が解消されているため、 develop へ mergeする際 に大量のconflictが発生することがほとんどなくなる Automation (GitHub Label) 最高
28 • 最強のBotを社内で飼っている ◦ Binary Submit, App Release, Crash Report,
Distribute Binary, etc…. ◦ 諸般の事情により、その姿をお見せすることはまだできない。。。。 ◦ (最強すぎるため) Automation (Bot)
29 • Mercari iOSのコードベースは日々進化を遂げている ◦ 100人で同時に開発できるスケーラブルな Architectureを目指して ◦ 数々の技術的な挑戦が積み重なっている •
Automationもがんばってる ◦ GitHub Label系Automation ◦ 社内最強Bot ◦ 参考: Automation/karakuri for increasing engineering productivity - TechBlog • 最高に楽しい ◦ iOS Engineerとして、メルカリ iOSのコードベースや開発環境はとても刺激的 ◦ 技術で世界を殴っていきたい方、お待ちしております。 Wrap up