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?
- you wouldn't be able to use this api in an app for the app store though...zpesk– zpesk2009-07-03 00:23:41 +00:00Commented 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.Kevin L.– Kevin L.2009-07-03 00:28:52 +00:00Commented Jul 3, 2009 at 0:28
- 2There is plenty of market for jailbroken phones. the app store is not the only game in town.Tim– Tim2009-07-03 01:59:39 +00:00Commented Jul 3, 2009 at 1:59
- Have you made any progress with this? I'd buy it.Tim– Tim2009-11-11 18:55:48 +00:00Commented Nov 11, 2009 at 18:55
- 1there 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.Abhi Beckert– Abhi Beckert2011-05-26 10:51:46 +00:00Commented May 26, 2011 at 10:51
5 Answers
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.
1 Comment
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
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.