6

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?

6
  • you wouldn't be able to use this api in an app for the app store though... Commented Jul 3, 2009 at 0:23
  • Absolutely. Apple would be unlikely to accept an app that uses undocumented APIs from anyone but Google, but this is just for sheer curiosity and coding fun. And perhaps in the next big iteration of the SDK Apple will bless this mysterious temperature API for app store use. Commented Jul 3, 2009 at 0:28
  • 2
    There is plenty of market for jailbroken phones. the app store is not the only game in town. Commented Jul 3, 2009 at 1:59
  • Have you made any progress with this? I'd buy it. Commented Nov 11, 2009 at 18:55
  • 1
    there is some mention of "temperature" in IOKit: github.com/kennytm/iphone-private-frameworks but I'm not familiar enough with IOKit to know how to use it, if that's even what we're looking for. Commented May 26, 2011 at 10:51

5 Answers 5

5

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.

Sign up to request clarification or add additional context in comments.

1 Comment

I agree. And I sure wouldn't control my air conditioner with this sensor's output. But because the iPhone is just a mere phone with low power passively cooled electronics, its thermometer should report a temperature close to ambient. Throw in an averaged offset and you've got a temperature reading that's good enough.
3

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

Comments

2

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.

Comments

1

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

Comments

0

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.