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!

Answered by DTS Engineer in 698533022

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"

Accepted Answer

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"

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.

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

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

iOS cpu/gpu/battery temperature readings
 
 
Q