Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

How to obtain frame rate for iOS proMotion devices

Due to the release of ProMotion devices, the system may switch frame rates in certain scenarios, resulting in the loss of reference value for data collected through CADisplayLink callbacks at a fixed 60Hz frame rate. We cannot distinguish whether the slow callback of CADisplayLink is due to a stutter or a system switch in frame rate.

I know Hitch Time Ratio, but I can't use this scheme for some reasons.

How can I distinguish between stuck and frame rate gear shift in CADisplaylink callback?

In iOS 15, CADisplayLink.preferredFrameRateRange.preferred always returns 0, while minimum and maximum do change. Can I use these minimum and maximum range values as criteria to distinguish between frame rate switching and stuttering?

Answered by DTS Engineer in 838548022

The Optimizing ProMotion refresh rates for iPhone 13 Pro and iPad Pro article provides recommendations for dealing with changing refresh rates on iOS devices with ProMotion displays. Our recommendations are to build your code to adapt to refresh rate changes and not to infer or make assumptions about why the refresh rate is changing.

I recall when putting that document together there was some talk about doing some of the kind of calculations you are talking about and adapting the app's GPU usage in response. But, since the system is already managing GPU usage and refresh rates for you (using undocumented algorithms that we are often improving and changing in system software updates) all such strategies are basically guaranteed to fail and/or cause unexpected behavior. It's better to re-organize your strategy so you are maximizing your usage of available GPU resources and able to gracefully respond to refresh rate changes (and with lots of testing on real world devices).

The Optimizing ProMotion refresh rates for iPhone 13 Pro and iPad Pro article provides recommendations for dealing with changing refresh rates on iOS devices with ProMotion displays. Our recommendations are to build your code to adapt to refresh rate changes and not to infer or make assumptions about why the refresh rate is changing.

I recall when putting that document together there was some talk about doing some of the kind of calculations you are talking about and adapting the app's GPU usage in response. But, since the system is already managing GPU usage and refresh rates for you (using undocumented algorithms that we are often improving and changing in system software updates) all such strategies are basically guaranteed to fail and/or cause unexpected behavior. It's better to re-organize your strategy so you are maximizing your usage of available GPU resources and able to gracefully respond to refresh rate changes (and with lots of testing on real world devices).

How to obtain frame rate for iOS proMotion devices
 
 
Q