Daily iOS
Performance and debugging

Finding the cause of freezes

Reviews of your shipped iOS app say it occasionally stops responding to touch for a few seconds. When it won't reproduce in the office, how do you get your hands on the stack from the moment the main thread stalled?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

Subscribe to MetricKit's MXHangDiagnostic to receive the main thread call stack from the moment a stall passed 250ms on real users' devices and upload it to your server, check in the Xcode Organizer Hangs report which version and screen the same stack was caught in and how often, then verify the code path that stack points to locally.

Share a question