Turns out the iPhone is even smarter than you might think...