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
モバイルアプリ_開発スピード向上Tips.pdf
Search
SatoshiN
May 29, 2018
0
23
モバイルアプリ_開発スピード向上Tips.pdf
SatoshiN
May 29, 2018
Tweet
Share
More Decks by SatoshiN
See All by SatoshiN
開発スピード向上Tipsその2.pdf
satoshin303
0
49
担当しているiOSアプリを全部作り直す開発中に_いろいろ半自動化した事_簡易版.pdf
satoshin303
0
69
秘伝のタレ.pdf
satoshin303
0
25
GitHub小技集.pdf
satoshin303
0
28
iOS_DC_2018_参加レポート.pdf
satoshin303
0
25
量子コンピュータ_の仕組みとQ_.pdf
satoshin303
0
190
Featured
See All Featured
Navigating Team Friction
lara
187
15k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
810
Documentation Writing (for coders)
carmenintech
72
4.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
125
52k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Practical Orchestrator
shlominoach
188
11k
Building a Modern Day E-commerce SEO Strategy
aleyda
42
7.4k
Agile that works and the tools we love
rasmusluckow
329
21k
Making the Leap to Tech Lead
cromwellryan
134
9.4k
Transcript
モバイルアプリ 開発スピード向上Tips (開発寄り) 2018 / 05 / 29
さらに 良質で高速な開発が求められる時代
自己紹介 佐藤慎 (さとしん) twitter @satoshin2071 github https://github.com/SatoshiN303 iOS (ObjC・Swift) /
Ruby DeepHouse, TechHouse, Nu Soul, Jazz
開発スピードアップのTipsをおさらいしてみる
※ ほぼ iOS 主体で話します
Level 0 iOS シミュレータの起動
前回のビルドを利用して シミュレータを起動する ⌘ + Ctl + R バグの現象確認などに
Level 1 Xcode ビルド設定最適化
ビルド時間が長い…
対処案 Xcodeの設定で ビルド時間を短く
Build Active Architecture Only を Debug : YES 最適なアーキテクチャでのみビルド
Optimization Level + Other Swift Flags (モジュール内の全体最適化を行いつつ、コード自体のCompileへ の最適化は無効化する) → 差分Buildは遅くなるが、Clean
Buildが大幅に早くなる → cocoapods や carthage 更新での clean 時に有利
その他 最適化 Tips が 以下にまとまっています • Build時間改善 • Xcodeのビルド待ちで消耗してたので見直したら50% 以上削減できた話
• iOSプロジェクトのビルドを高速化する
Level 2 UI 修正確認の高速化
修正したらシミュレータ立ち上げて画面遷移して… UI を確認するまでに時間が掛かる
解決案 • Playgroundドリブンな開発 • Injection ドリブンな開発
Playground ドリブンな開発 PlaygroundのLiveView に ViewController を 読み込ませてシミュレータ代わりに
Injection ⌘+S で シミュレータを更新
比較検証 Playground Driven Development • 設定: Playgroudの追加, import 等 •
ViewのFramework化が必要 • Playground.liveViewで更新 (遅め?) • Storyboard での更新は 再Build の必要有 Injection • 設定: Macアプリをインストール • injection()メソッドを 追加する必要あり • ⌘ + R で更新 • Storyboard での更新は 再Build の必要有 UI を コードで実装する際に Injection 使うと早そう
参考リンク • Injection • Playground Driven Development
Level 3 WebAPI 結合の高速化
◯◯の実装をしたい ◯◯ API のレスポンスを jsonファイルで下さい WebAPI 同時開発の初期によくある光景 json出力しました。 (一式渡される)
結合テストまで遠い API修正の度に発生 (やりとりコスト⤴) 結合テスト時のコスト⤴⤴
解決案 API仕様書ドリブンな 開発フローにする
None
None
サーバー / クライアントのコードを生成 (デモ) swagger-api/swagger-codegen $ swagger-codegen generate -l {LanguageName}
-i hoge.yml -o build/output/
API仕様書ドリブンで開発 (TopDown形式) 仕様書からサーバーサ イドの実装雛形を生成 仕様書から モックサーバー 生成 エンティティ APIクライアント生成
稼働しているAPIをswagger化 (BottomUp形式)
メリット - 結合テストエラー時の 原因の特定が早くなる - 差分管理が容易
デメリット - OpenAPI の理解が必要 - yml の肥大化を防ぐ手間
参考リンク • swagger-codegen から眺める Swift4 • OAI/OpenAPI-Specification • SwaggerでRESTful APIの管理を楽にする
• 似たようなツール • API BluePrint
まとめ スピードを向上させて 時間を掛けて開発したい箇所の比率を上げていきましょう Swift-Project-Template