iOS cpu/gpu/battery temperature readings

Good day!

I'm interested in if there is any way to query CPU/GPU/Battery temperature values on recent iOS systems?

I've tried to search forums for "cpu temp", "ios temperature", "battery temperature" etc., but didn't find anything. There was only mentioned some old private API which was supposed to work somehow for iOS<10. All the examples I've found didn't even compile. All the requests and suggestions are pretty old and seems irrelevant.

So I decided to bump this topic. Are there any updates?

Any hints and suggestions are highly appreciated! Best regards!

  • I’m interested in the same thing, because I want to make an app that shows cpu temperature and other cpu and system measurements.

Add a Comment

Accepted Reply

I'm interested in if there is any way to query CPU/GPU/Battery temperature values on recent iOS systems?

There’s no supported way to get that sort of info on iOS.

What would you do with this info if you had it?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

  • Thanks for reply, eskimo!

    I will use this along with other tools to profile my application. It may be useful in automotive testing to check cpu temperature at a certain point in time or calculate and compare average within subsequent runs. I assume that the temperature is a direct consequence of the increased cpu load. Of course I understand that there are other apps/services affecting cpu load. But I would like to try and find anything useful.

  • My company has roof inspectors that use their phones outside, on a roof. The phones get really hot. Being able to detect when the phone is reaching its thermal limit could allow us to save data before its too late.

Add a Comment

Replies

I'm interested in if there is any way to query CPU/GPU/Battery temperature values on recent iOS systems?

There’s no supported way to get that sort of info on iOS.

What would you do with this info if you had it?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

  • Thanks for reply, eskimo!

    I will use this along with other tools to profile my application. It may be useful in automotive testing to check cpu temperature at a certain point in time or calculate and compare average within subsequent runs. I assume that the temperature is a direct consequence of the increased cpu load. Of course I understand that there are other apps/services affecting cpu load. But I would like to try and find anything useful.

  • My company has roof inspectors that use their phones outside, on a roof. The phones get really hot. Being able to detect when the phone is reaching its thermal limit could allow us to save data before its too late.

Add a Comment

It may be useful in automotive testing to check cpu temperature at a certain point in time or calculate and compare average within subsequent runs. I assume that the temperature is a direct consequence of the increased cpu load.

Not exclusively. The GPU and the cellular modem are also major power drains that vary significantly with usage.

If you want to measure CPU load for profiling purposes, the go-to tool is Instruments. If you want an API that you can use in production, check out MetricKit. If you want to build your own tooling for use during testing, there are lower-level APIs available [1]. Check out <mach/host_info.h>, <mach/task_info.h>, and <mach/thread_info.h>.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] The nature of these low-level APIs means that I’m reticent to recommend them for deploying in a production app.

Maybe not exactly what you are looking for, but might be helpful: https://developer.apple.com/documentation/foundation/nsprocessinfo/1417480-thermalstate

  • Good point! Thanks for highlighting that.

Add a Comment