I released my first iOS app in 2008, the year that iPhone changed the world.
Recently, in time for World Cup 2018, I release v3 of the same app.
As I rewrite the app – from Objective-C to Swift – it dawned on me how much things have changed.
How much the tools have improved. How different designs and architectures are. How much my code has evolved.
As I look at the code evolving from v1 -> v2 -> v3 (thanks source control), I feel like I am reading my diary. It tells my story in iOS development.
- SVN Source Control (git not popular back then)
- AppDelegate is 1,600+ lines long!
- Code form is inconsistent
- Multiple line breaks
- Commented out many code for some reason
- Table view cell are constructed with nibs, then configured with
- Models are dictionaries and arrays
- 1 month to finish
- iOS 6 is a big change with cleaner interface
- Wrote better abstraction
Type2ViewController, … etc with
OddsViewController, which configure the cell according to the type
- Still Objective-C (no Swift yet)
- Use of Cocoapods libraries
- Use of my own private library
- Helpful models, but with lots of mutation func
- Objective-C to Swift
- Strongly typed language eliminates many meaningless crashes.
- Better namings of everything
- Xcode can finally can refactor by renaming methods and types
- Scalable UI
- Auto Layout for any device size or orientation
- Dynamic (Font) Type
- No more storyboard
- All UI created by code with constraints
- Better Architecture
- Clearer responsibilities
- Reasonable dependencies
- MVVM with RxSwift
- Unit Tests with API fixtures
- Fastlane for managing certs, provisioning profiles, building and uploading releases
- 7 days to rewrite