I left my phone in the glove compartment while I was driving, it was really cold outside, and when I picked it up it was literally ice cold. Could this have damaged my internals in any way?
For an iPhone:
-------------------
Operating ambient temperature: 32° to 95° F (0° to 35° C)
Nonoperating temperature: −4° to 113° F (−20° to 45° C)
-------------------
For an iPhone:
-------------------
Operating ambient temperature: 32° to 95° F (0° to 35° C)
Nonoperating temperature: −4° to 113° F (−20° to 45° C)
-------------------
The answer is "yes, it can," but you probably want an answer of "yes, it did," or "no, it didn't," which we can't give you.
While the phone electronics may not be damaged, do not charge the phone with the battery at or below 0°C/32°F or above 40°C/104°F, ever, unless you like damaging your battery. This is even more important if the phone has a non-user serviceable battery such an an iPhone. While you can assume there is a temperature sensor that should govern the charging at temperature extremes, there's no point in assuming and damaging a battery, or worse. While you shouldn't charge a battery in freezing temperatures, you may safely discharge a lithium ion battery at temperatures of -20°C/-4°F.
Devices like iPhones have moisture sensors so Apple can deny warranty service when it suspects there is moisture damage, so while freezing temperatures may not directly damage your phone, resulting moisture build-up from an extreme temperature differential may cause issues.