Kevin L.
Kevin L.

Reputation: 4558

iPhone Temperature Sensor

My question is very similar to this one: iPhone Proximity Sensor. There's clearly some manner of thermometer within the iPhone that's readable by the OS. Has anyone uncovered the super-secret undocumented APIs to read this sensor?

Upvotes: 6

Views: 13169

Answers (5)

Damiaan Dufaux
Damiaan Dufaux

Reputation: 4785

There is a HIDServiceClient with product name "Ambient" that has the ambient temperature readings you are looking for.

To get to this HIDServiceClient you will need to use some private API's. An example app that reads out this "Ambient" sensor (and a lot of other thermal sensor data) can be found at https://github.com/Dev1an/ThermalSensorMonitor

You can use this for internal testing purposes but it will probably be rejected once you try to get this to the store.

Upvotes: 0

Maxim Kholyavkin
Maxim Kholyavkin

Reputation: 4573

command to get all super-secret names which related with temperature in CoreTelephony framework

nm "/Applications/Xcode463.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/6.1 (10B141)/Symbols/System/Library/Frameworks/CoreTelephony.framework/CoreTelephony" | grep empera

Upvotes: 1

joe johnson
joe johnson

Reputation: 21

I don't know about previous models, but my iPhone4 goes from cool-ish to very warm in a matter of minutes depending on the various radio usages. So unless "good enough" = "within 20 degrees F or so", then probably not good for ambient measurement.

Unless (maybe you meant this) you could also track radio usage and subtract a temperature variable depending on radio usages. phew. complicated. Easier to just query NWS.

Upvotes: 2

valexa
valexa

Reputation: 4503

All i could find was CTGetTemperature in CoreTelephony of all places.

Upvotes: 3

Tim
Tim

Reputation: 20360

I doubt this sensor is for ambient temperature - rather I suspect it is for overheating of the circuits. If that is all you want then great, but again, I think it would be useless for ambient temperature.

just my opinion.

Upvotes: 5

Related Questions