WWDC 2022: Track down hangs with Xcode and on-device detection
Find hereafter a detailed summary of four videos that belong to a taxonomy of some WWDC footages.
The original videos are available on the Apple official website (session 10082).
"Learn how you can increase responsiveness and eliminate hangs in your app and make even better experiences. Hang out with the Performance Tools team as we explore how you can track down these issues — and even stop them from occurring in the first place.
We'll take you through the latest detection mechanisms for iOS to help track hangs during pre-release testing, show you how to identify issues in release builds using the Xcode Organizer, and more."
Most of the illustrations are parts of the Apple presentations and may be available at the Resources
section inside the Overview
sheet of each video.
Hereafter, the underlined elements lead directly to the playback of the WWDC video at the appropriate moment.
Hangs definition #
The three phases of the app-development process...
... now contain new tools to detect and report hangs:
- MetricKit
- Xcode Metric Organizer
- Thread Performance Checker
- Hang Detection
- On-device Hang Detection
- Hang Reports
Development #
Thread Performance Checker #
This tool notifies in the Xcode
Issue
Navigator
when it detects priority inversions or non-UI work on the app main thread.
Time Profiler #
This tool detects hangs and labels them directly in the corresponding process track.
This new feature enables to highlight the main thread unresponsiveness awaiting for another thread return.
Hang tracing #
This instrument may be used to configure a hang duration threshold in order to find specific periods of unresponsiveness.
Beta #
The on-device hang detection is used for development-signed or TestFlight apps, and notifies hangs in real time while supporting diagnostics by providing the main steps with no specific details.
The tailspin in Instruments
may be of a great interest if a more advanced study of the diagnostic is necessary.
Public release #
Xcode
14
supports hangs reports directly from the users devices.
Monitoring the power and performance metrics goes with a new notifications alert button to be informed of an important and unexpected hangs rate.
Adding symbolication to the app will be of a great assistance when decoding and understanding all the messages will be topical.