Case study · iOS · Code review
PMI Market(i)
A technical audit of Market(i), an internal iPad and iPhone app for Philip Morris field teams in the Nordics, and a roadmap for maintaining its legacy Objective-C codebase.
Delivered at MerkleEnterprise mobile & digital engineering
- Client
- Philip Morris International, Nordics
- My role
- Mobile codebase assessment
- Period
- Sep 2021 – May 2022 (approx.)
- Platform
- iOS · Objective-C · UIKit
The brief
Market(i) helps field teams photograph and share store shelves with hashtags and private tags, see stores on a map, follow share of market and work offline with sync. It had grown over years and was about to be handed over for maintenance.
I assessed the inherited codebase independently, so the client would know its condition and what keeping it alive would take.
What I reviewed
- The features: shelf photos with tags, store map with clustering, share of market, segmentation, POS and sync.
- The code: about 440 Objective-C files of its own, CocoaPods and Core Data.
- Dependencies and SDKs, build settings and deployment targets.
- Tooling, tests and debug libraries in every configuration.
- A maintenance roadmap from urgent fixes to modernisation.
Findings
Each one confirmed in the code.
- High
Networking on AFNetworking 1.x
Pinned below 1.9, with AFHTTPRequestOperation in 19 files.
- High
Debug tools in every build
PonyDebugger and Reveal linked in all configurations, including release.
- Medium
Deprecated SDKs
Fabric / CrashlyticsKit and the legacy Google Analytics SDK still in use.
- Medium
Old patterns
ReactiveCocoa 2.5 and UIAlertView in 17 files.
- Medium
Mismatched targets
The Podfile targets iOS 9 while the project targets iOS 12.4.
- Medium
No unit tests
Every change has to be verified by hand.
Stack
- Objective-C
- UIKit
- Core Data
- CocoaPods
- AFNetworking
- ReactiveCocoa
Team
An independent assessment, in coordination with the project stakeholders.
The result
A prioritised list of risks and a roadmap from urgent fixes to modernisation. The maintenance engagement itself did not go ahead.
VNCriticalAFNetworking pinned below 1.9
AFHTTPRequestOperation in 19 files, on a library that has had no support for years. Move networking to URLSession.