Getting cooler these days, thought it's a good idea adding some temperature function in apps, anyone knows iPhone has the hardware to support that?
Unfortunately there isn't. Any thermometer that were ever included in the iPhone would be affected by the internal temperature of the device anyway (they get hot!)
If you're desperate, you could record the sound of crickets chirping using the iPhone's microphone and analyse it's frequency to get the temperature. But otherwise no.
I know this is not what you thought of, but anyway:
Get the current position (you only need to know the town / region, GPS is not required). Then get the current temperature for this place from the internet (weather channel or so).
hardware support: no but u can always cheat and use the internet to get local forecast :)
There isn't anything available to user apps and frankly there should be. Lets face the senor would be directly affected by local conditions but some times that is exactly what you want. This is probably a good item to file a bug report against. A barometer wouldn't be a bad idea either.
Dave
I came up an idea of this, Andrew Dunn mentioned microphone, we know lots of phones using two microphones' recordings subtract out the human voice, I think if there is a thermometer, and there is an energy counter counts the energy the device burns, could subtracts out the environment temperature. Counter tells the temperature should be; thermometer tells the temperature actually is; then the subtraction tells what environment the thermometer (device) is in. Of course theoretically, thank you Andrew for the microphone!
Realistically, you could probably cobble together a 555 timer chip and a thermistor to produce a frequency in the audio range for your temperatures of interest. Feed that audio to the mic input on the headset jack of an iDevice via an attenuation resistor.
Bonus points if you play loud music thru the headset output at the same time, and can figure out how to harvest that audio output energy with an AC-to-DC converter to power the 555 chip.
Would work even in climates where crickets might be hard to find alive.