iOS Developer interview question
How do you investigate iOS performance issues?
Investigate iOS performance with Instruments and signposts: measure launch, hangs, frame drops, CPU, allocations and network, then fix the measured main-thread or resource bottleneck and compare again.
Direct answer
What a strong answer covers
How it works
Instruments is the starting point, with signposts placed in code so the trace maps to features. The Time Profiler shows where the main thread spends its time during a hang, the Animation Hitches template shows frames that missed their deadline and why, Allocations shows memory churn, and the Network template shows serial requests that could be parallel. App launch is measured with the App Launch template and MetricKit reports from real users. Fixes follow the evidence: moving work off the main thread, caching decoded images, reducing layout passes, or batching requests, each verified with the same trace afterwards.
Example
A feed that hitched on scroll showed in the Animation Hitches trace that every cell synchronously decoded a JPEG during layout; decoding in advance with a background image pipeline and prepareForDisplay removed the hitches. MetricKit later revealed a 2.5 s launch on older devices caused by a synchronous Core Data migration, moved to a background context with a progress screen.
Common mistakes
- Optimising code paths that Instruments never showed as hot.
- Testing only on the latest iPhone and shipping hangs to older devices.
- Adding DispatchQueue.global calls everywhere without measuring, creating thread explosion.
A useful answer structure
Answer from your own work.
Do not memorise a script: use only examples you can explain honestly in follow-up questions.
Open the desktop workspace and rehearse a clear answer in your own words.