I recently found out that the iPhone keeps (at least on older versions) your location data in a data file:
I have an iPhone on iOS 6 but my consolidated.db doesn't have the CellLocation table. The only table that has Lat / Lon information is Fences, but it's empty.
Has Apple fixed the security hole and stopped recording the data?
I found this article saying that Apple promised to keep the data for a shorter time:
I'd like something more certain about which iOS versions are affected.