Hoping to put to rest a growing controversy over privacy, Steven P. Jobs, Apple's chief executive, took the unusual step of personally explaining that while Apple had made mistakes in how it handled location data on its mobile devices, it had not used the iPhone and iPad to keep tabs on the whereabouts of its customers.
"We haven't been tracking anybody," Mr. Jobs said in an interview on Wednesday. "Never have. Never will."
Mr. Jobs said that Apple would fix the mistakes in a free software update that it would release in the next few weeks.
Mr. Jobs, who is currently on medical leave, addressed the issue along with two Apple executives -- Philip W. Schiller, the senior vice president of worldwide product marketing, and Scott Forstall, the senior vice president of iPhone software. A week ago, two researchers reported that they had discovered a file in Apple's devices containing what appeared to be data of the locations visited by users over the previous 12 months. The discovery raised fears that Apple was tracking its users and prompted investigations by various European governments and demands for explanations from United States lawmakers.
Earlier on Wednesday, Apple posted a statement on its Web site explaining how its system used the file to pinpoint a phone's location.
Mr. Jobs defended the timing of Apple's response to the controversy, saying that "rather than run to the P.R. department," it set out to determine exactly what happened.
"The first thing we always do when a problem is brought to us is we try to isolate it and find out if it is real," he said. "It took us about a week to do an investigation and write a response, which is fairly quick for something this technically complicated."
He added, "Scott and Phil and myself were all involved in writing the response because we think it is that important."
Some privacy advocates who were harshly critical of Apple last week praised the company's response, saying it was a step in the right direction.
"Apple acknowledged a mistake and they fixed it," Marc Rotenberg, executive director of the Electronic Privacy Information Center, said in an interview. "That's a good thing."
Confirming speculation from some security researchers, Apple said in the statement posted on its Web site that the file in people's iPhones was not a log of their locations but rather "the locations of Wi-Fi hot spots and cell towers surrounding the iPhone's location, which can be more than one hundred miles away from the iPhone."
Apple said it used the data, which it called a cache, to calculate a device's location more quickly than through GPS satellites.
But Apple acknowledged that it had made mistakes, which it attributed to programming errors, in storing the data for a long time, keeping the file unencrypted and storing the data even when users had chosen to turn off location services.
"The system is incredibly complex," Mr. Forstall said. "We test this carefully but in such a complex system there are sometimes places where we could do better."
Apple said it would reduce the location cache on the iPhone to no more than seven days. The company also said it would stop backing up the cache onto people's computers and would delete the cache entirely when users turned off location services.
Apple also said that it updated its database of Wi-Fi hot spots and cell towers by using its customers' phones as sensors. But it said that it could not locate users based on the file on the phone, and that it collected the information in an anonymous and encrypted form. The company cannot identify the phone user from the data, it said.
While some security experts have known about the existence of the file for some time, the issue made headlines last week after the researchers reported their findings at a technology conference in San Francisco. Apple came under heavy criticism for its silence after the discovery.
The location report attracted attention from some government officials, including Senator Al Franken, Democrat of Minnesota, who sent a stern letter to Apple asking why it was "secretly compiling" the data and what it would be used for. Congressman Edward Markey, a Democrat from Massachusetts, and Lisa Madigan, the Illinois attorney general, also sent letters to Apple asking for an explanation of the issue.
Google acknowledged last week that it, too, collected data about the location of Wi-Fi hot spots and cell towers from its users.
Apple's statement contained a tidbit about possible future product plans. The company said it also was collecting traffic data from its phones and tablets to build a crowd-sourced traffic database. That would enable Apple to provide real-time traffic information along with navigation advice. Google already uses Android phones to collect real-time traffic information.
Mr. Jobs declined to answer questions about his health or about any plans to return to Apple. Last week, during the company's quarterly financial report, Timothy D. Cook, the chief operating officer, said, "He continues to be involved in major strategic decisions, and I know he wants to be back full time."
For the latest tech news and reviews, follow Gadgets 360 on X, Facebook, WhatsApp, Threads and Google News. For the latest videos on gadgets and tech, subscribe to our YouTube channel. If you want to know everything about top influencers, follow our in-house Who'sThat360 on Instagram and YouTube.