This week Apple was awarded a haul of 53 patents.
Among them was a patent related to automobiles.
The patent uses sensors in the mobile device, aka iPhone, to determine if the user is still inside the vehicle or has exited.
This would be useful inside the Apple car and likely any car using the Apple CarPlay interface. It would allow the iPhone to act as a key fob and thereby eliminate the need for users to carry an extra key.
The car would know you have entered with your iPhone and would allow it to be turned on. It would know when you left and thus be able to turn itself off or lock it.
It would be a pleasure to only have to remember to bring my iPhone and not my key as well!