Refactor Your Way Forward
summary
Refactors an Objective‑C app (example: OpenIt) into Swift incrementally, adding a test target and meaningful unit tests, swapping the app delegate to Swift, removing storyboard auto‑launch in Info.plist and wiring view controllers with dependency injection via prepareForSegue and a bridging header. Implements Clean Architecture layers (presenter → interactor/use case) and a concrete Apple rating API use case that prompts based on action counts and elapsed days, uses struct wrappers for Obj‑C interop, and follows the Geisha technique of tiny steps and frequent commits.
AI-written summary · about
chapters (14)
- 0:00Introduction to refactoring
- 1:27Legacy code challenges
- 6:12Strategy for refactoring
- 13:21Gathering codebase information
- 24:15Geisha technique for refactoring
- 25:18Adding tests to legacy code
- 32:50Refactoring app delegate
- 33:31Dependency injection setup
- 35:22Introducing presenters
- 37:24Moving persistence logic
- 38:28Storyboard migration
- 41:03Implementing new use case
- 42:08Recap and incremental improvements
- 45:23Q&A on refactoring trade-offs
related talks
44mSeparation of concerns: Refactoring view controllers live
37mWriting Swift, while living on Objective-C
07mModel View Controller
42mWhat We Learned Refactoring an App with 100 People
53mSwift: New Paradigms for iOS Development
45mMoving from Objective-C to Swift — Is It Really That Simple?
32mDemystifying Native Mobile Apps Architecture
27mLow-Hanging View Controller Fruits
