Apple dismissed claims it was tracking iPhone users but said it would fix software "bugs" that resulted in location data being unencrypted and stored for up to a year.
"Apple is not tracking the location of your iPhone," the California-based company said in its first response to privacy questions raised by a pair of researchers. "Apple has never done so and has no plans to ever do so."
Apple said the iPhone was not logging a user's location but maintaining a database of nearby Wi-Fi hotspots and cell towers to "help your iPhone rapidly and accurately calculate its location when requested."
According to the British researchers, iPhones and iPads running iOS 4, the latest operating system, were storing latitude and longitude coordinates in a hidden file along with a time stamp and the data was easily retrievable.
"By passively logging your location without your permission, Apple have made it possible for anyone from a jealous spouse to a private investigator to get a detailed picture of your movements," they said.
Apple said the location data the researchers were seeing on the iPhone is "not the past or present location of the iPhone, but rather the locations of Wi-Fi hotspots and cell towers surrounding the iPhone's location, which can be more than one hundred miles away from the iPhone."
"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."
"This data is sent to Apple in an anonymous and encrypted form," Apple said in a 10-point statement presented in question-and-answer format. "Apple cannot identify the source of this data."
Apple said the location data cache will be encrypted on the iPhone in a free iOS software update in the next few weeks and can be deleted when the Location Services feature is turned off on the device.
Apple also said it planned to reduce the amount of time the Wi-Fi and cell tower data is stored on the iPhone from as much as a year to seven days.
"The reason the iPhone stores so much data is a bug we uncovered and plan to fix shortly," Apple said. "We don't think the iPhone needs to store more than seven days of this data."
Apple said it was using location data to help target advertising but was not sharing it with third parties unless it has explicit approval from a user.
In an indication of how seriously Apple takes the privacy allegations, chief executive Steve Jobs interrupted his medical leave of absence to address the question.
"We haven't been tracking anyone," Jobs said in a telephone interview with the All Things Digital blog Mobilized.
"The files they found on these phones, as we explained, it turned out were basically files we have built through anonymous, crowdsourced information that we collect from the tens of millions of iPhones out there," Jobs said.
US lawmakers this week invited Apple and Google to attend a hearing on privacy next month following the claims that the iPhone and Android devices were regularly tracking a user's location and storing the data.
The House Energy and Commerce Committee also sent letters to Apple, Google, Microsoft, Nokia, Research in Motion and Hewlett-Packard asking whether their devices are tracking, storing, and sharing users' locations.
Jobs said Apple would likely send a representative to the Senate hearing.
"I think Apple will be testifying," he told Mobilized. "They have asked us to come and we will honour their request, of course."
Jobs also said technology companies have done a poor job educating users.
"As new technology comes into the society there is a period of adjustment and education," he said. "We haven't, as an industry, done a very good job educating people, I think, as to some of the more subtle things going on here.
"As such, (people) jumped to a lot of wrong conclusions in the last week."
Apple shares were down 0.15 percent at $349.89 in afternoon trading on Wall Street.