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
mf_cloud_expense_mobile_app_rearchitecture
Search
yuki shinohara
May 14, 2025
Programming
0
930
mf_cloud_expense_mobile_app_rearchitecture
yuki shinohara
May 14, 2025
Tweet
Share
More Decks by yuki shinohara
See All by yuki shinohara
iOSアプリの信頼性を向上させる取り組み/ios-app-improve-reliability
shino8rayu9
0
110
Road to Swift 6
shino8rayu9
0
570
Other Decks in Programming
See All in Programming
複雑化したリポジトリをなんとかした話 pipenvからuvによるモノレポ構成への移行
satoshi256kbyte
0
530
エンジニアとして高みを目指す、 利益を生み出す設計の考え方 / design-for-profit
minodriven
23
11k
ABEMAモバイルアプリが Kotlin Multiplatformと歩んだ5年 ─ 導入と運用、成功と課題 / iOSDC 2025
akkyie
0
290
AIエージェント時代における TypeScriptスキーマ駆動開発の新たな役割
bicstone
4
1.2k
プログラマのための作曲入門
cheebow
0
490
Server Less Code More - コードを書かない時代に生きるサーバーレスデザイン / server-less-code-more
gawa
5
1.9k
階層構造を表現するデータ構造とリファクタリング 〜1年で10倍成長したプロダクトの変化と課題〜
yuhisatoxxx
3
730
CSC305 Lecture 04
javiergs
PRO
0
230
Back to the Future: Let me tell you about the ACP protocol
terhechte
0
120
WebエンジニアがSwiftをブラウザで動かすプレイグラウンドを作ってみた
ohmori_yusuke
0
160
Breaking Up with Big ViewModels — Without Breaking Your Architecture (droidcon Berlin 2025)
steliosf
PRO
1
260
AccessorySetupKitで実現するシームレスなペアリング体験 / Seamless pairing with AccessorySetupKit
nekowen
0
200
Featured
See All Featured
Context Engineering - Making Every Token Count
addyosmani
3
130
GraphQLとの向き合い方2022年版
quramy
49
14k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Making the Leap to Tech Lead
cromwellryan
135
9.5k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
560
Music & Morning Musume
bryan
46
6.8k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
880
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
The Cost Of JavaScript in 2023
addyosmani
53
9k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.6k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
Transcript
マネーフォワード クラウド経費 モバイルアプリのリアーキ テクチャをめぐる紆余曲折 2025/05/14
Introduction 篠原 裕貴 ・仕事: マネーフォワード クラウド経費 iOSエンジニア ・経歴: 地方公務員→英会話講師→iOSエンジニア
マネーフォワード クラウド経費
明細入力画面
None
None
課題
明細入力画面の課題 ❏ ViewControllerファイルのコードが1,900行+ ❏ テストカバレッジは0.8% ❏ ViewModelのファイルも1,900行+ ❏ テストカバレッジは20.6% ❏
新規機能追加の度に多くの時間を手動で動作確認が必須
その他の画面の課題 ❏ 大部分はReactorKitによりリファクタ済 ❏ Reducerのテストカバレッジは90%前後 ❏ しかしもうメンテされていない(最終更新日は 2022年1月) ❏ 依存コードが直接実装されてしまっている
❏ カメラ画面の呼び出し、写真アプリの呼び出し etc ❏ テストが書けない ❏ 毎回コンパイルに時間がかかる
当初
TCA https://github.com/pointfreeco/swift-composable-architecture
なぜTCAか ❏ テスト書きやすい ❏ ReactorKitに似てる ❏ Pay for Businessで利用実績があった
なぜTCAか ❏ テスト書きやすい ❏ ReactorKitに似てる ❏ Pay for Businessで利用実績があった
リファクタ開始 ❏ まずは新規画面をTCAを使って作成 ❏ ゆくゆくは明細入力画面→ReactorKitの画面をリファクタしていく
苦しくなってきた ❏ バージョンアップが多くしんどくなってきた ❏ 新規iOSエンジニアの学習コストが大きい ❏ 画面が大きくなるとコンパイルがうまく行かない ❏ おそらくもっとモジュール分けすべきだった
方向転換
基本に立ち返る ❏ 諸悪の根源はテストがない・書けないこと ❏ 明細入力画面をテストを書ける形にするべき ❏ ViewControllerとViewModelのコードを整理 ❏ 各種ロジックを別クラスに整理しテストを追加 ❏
依存コードをモジュールに分ける ❏ テストで依存コードをモックに置き換えられるようにする ❏ モジュールごとにコンパイルでき、開発スピードが上がる
テストで依存コードをモックに置き換えられるようにする/モジュールご とにコンパイルでき、開発スピードが上がる
先を見据える ❏ iOSエンジニアの採用は難しい ❏ TCAエンジニアの採用はもっと難しい ❏ サードパーティの利用メリット vs 学習コストやメンテナンスが止まるリスク
まとめ
まとめ ❏ 長い目で見て今はなるべく言語機能に沿った開発を進めて行く方針 ❏ それでもTCAは個人的には好きだし、個人的にはキャッチアップは続けていきたい
おわり