If the sun gets too hot, treat your iPhone to a moist towel and a hat.
The Tech Specs say: Operating temperature: 32° to 95° F (0° to 35° C). Summers in Greece are long and dry, with temperatures often exceeding extremes of 37°C (99°F).
Sailing in Greece the temperature went high, the iPhone overheated, and defensively stopped charging—it said it was charged, which was confusing, as it wasn't. When it got really hot it just gave up altogether and shut down. Our Humminbird Fishfinder GPS unit also shut down from overheating—even before the iPhone did.
How to keep your iPhone cool? Take a moist paper towel, folded to the size of the back of the phone. Put it on the back of the phone and ensure that the air can get to it so that the moisture evaporates gradually. You'll need to take the paper towel off from time to time to moisten it again.
I also used a hat to keep the phone in the shade.
This enabled me to keep navigating with Navionics GPS software in the relentless Greek sun.