(CNN) -- After a week of silence, Apple on Wednesday responded to widespread complaints about iPhones and iPads tracking their users' whereabouts by saying "the iPhone is not logging your location" and announcing an upcoming mobile software update.
The next version of Apple's iOS will store data about a phone's location for only seven days instead of for months, as was previously the case, the company says. Apple blamed the fact that so much location data had been stored on users' phones and computers on a software "bug."
"The reason the iPhone stores so much data is a bug we uncovered and plan to fix shortly," the company said in a news release. "We don't think the iPhone needs to store more than seven days of this data."
The software update will be released in a few weeks, Apple said. That update also will fix another apparent bug, which prevented iPhone and iPad 3G users from being able to turn off location logging on their mobile devices.
"When I turn off Location Services, why does my iPhone sometimes continue updating its Wi-Fi and cell tower data from Apple's crowd-sourced database?" the company asks itself in a Q&A posted on Apple's media relations site.
"It shouldn't," the company says. "This is a bug, which we plan to fix shortly."
"Apple will continue to be one of the leaders in strengthening personal information security and privacy," the company adds.
Many iPhone and iPad users expressed outrage last week when two data researchers uncovered a secret file stored on Apple's mobile devices and on the computers that are synced to those devices via the iTunes program. This file, called "consolidated.db," kept a log of the mobile device's general location going back to June when Apple released a new version of its operating system.
Apple does not have access to individual location data in that file, the company says, but many users were concerned that it even existed. Furthermore, public officials complained that the file was "unencrypted," meaning that, if someone got access to an iPhone or synced computer, they could steal this file with relative ease since it was not password-protected.
Apple downplayed these concerns in its statement.
"The location data that researchers are 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," the company said.
Apple had faced mounting pressure over the past week to explain why its mobile devices were tracking users' whereabouts without their knowledge. Several U.S. senators sent separate letters to Apple CEO Steve Jobs, asking him questions about the matter.
According to Bloomberg, government authorites in South Korea, Italy, Germany and France are investigating whether Apple's data collection violated any laws in those countries.
Last Friday, two Apple customers filed a federal lawsuit in Florida against Apple over the issue and asked a judge to stop the company from collecting users' location data.
Many tech bloggers posted maps based on the location data logged by their iPhones, and several wrote that the data was eerily accurate, giving a block-by-block view of their activities in some cases.
Apple pointed out that users who are concerned about the security of their location history can choose to encrypt the data that's stored on their computer by choosing the "encrypted sync" option in iTunes.
One big mystery of this whole location-data saga has been this question: Why does Apple want to log all of this location info in the first place?
The answer came in parts through the Apple news release. The company may have been collecting some of this info accidentally, since it says some of the data collection resulted from software bugs. It also says it is collecting anonymous location data about iPhones to produce better traffic maps.
"Apple is now collecting anonymous traffic data to build a crowd-sourced traffic database with the goal of providing iPhone users an improved traffic service in the next couple of years," the company says.
Overall, the company did not so much apologize to users for this snafu as tell them that they just didn't understand how complicated this situation is.
"The iPhone is not logging your location. Rather, it's maintaining a database of Wi-Fi hotspots and cell towers around your current location, some of which may be located more than one hundred miles away from your iPhone, to help your iPhone rapidly and accurately calculate its location when requested," the company said.
It added: "Providing mobile users with fast and accurate location information while preserving their security and privacy has raised some very complex technical issues which are hard to communicate in a soundbite. Users are confused, partly because the creators of this new technology (including Apple) have not provided enough education about these issues to date."