Apple's Wednesday response comes nearly a week after two data scientists revealed that an unprotected file stored on iPhones and iPads was keeping a history of location data dating back to 10 months ago. Following that story, The Wall Street Journal discovered that the devices continue to store location data, even when location services are switched off.

Two customers have already filed a lawsuit against Apple, accusing the company of violating computer fraud laws by secretly recording location data of iPhone and iPad users.

Apple admits in the Q&A statement that the file should not be storing so much data dating as far back as a year ago, and it should not be storing location data even after location services are turned off. The company said an upcoming, free software update would fix both these issues, plus, it would encrypt the database file.

It's worth noting that although Apple claims the excessive location-data storage method is a bug, the company recently filed for a patent that describes a location-gathering method in which the iPhone's database file does not remove location history entries until the location database becomes full.

In the Q&A statement, Apple explained that the iPhone is collecting information on nearby cell towers and Wi-Fi access points to help customers rapidly calculate and accurately find their location.

Apple calls this "crowdsourcing" location data, because millions of iPhones are collecting this data and transmitting it to Apple to build its comprehensive location database to assist with location services.

"Calculating a phone’s location using just GPS satellite data can take up to several minutes," Apple said. "iPhone can reduce this time to just a few seconds by using Wi-Fi hotspot and cell tower data to quickly find GPS satellites, and even triangulate its location using just Wi-Fi hotspot and cell tower data when GPS is not available (such as indoors or in basements)."

Apple said the bug fixes would arrive with the next major iOS software update.