The company explains in an FAQ, posted on its Web site this morning, that it is not stalking its iPhone customers, but is instead trying to get more accurate location information. It also admits that there is a bug in the software that is making the iPhone store too much information.

Last week, researchers discovered that the iPhone has been logging and storing location information on users for the past year. The information is stored in an unencrypted file on the iPhone and also is backed up in an unencrypted form on computers running iTunes. The data is also sent to Apple.

The fact that Apple has been storing location information on consumer devices--unencrypted and without a customers' permission--has caused an uproar in the privacy community. For a week, Apple has refused to comment on the situation. Now it's explaining its side of the story.

In the FAQ, Apple says that it is not tracking users' whereabouts. Instead it said it is logging the locations of Wi-Fi hot spots and cell phone towers that are close to the iPhone and is maintaining a database in an attempt to improve location-based services. Apple said that it cannot track individual users with the location information that is sent to the company because it is sent to Apple in an anonymous and encrypted form.

"Apple is not tracking the location of your iPhone. Apple has never done so and has no plans to ever do so," the FAQ says.

But the company did admit that it may be storing too much information about users' location. And it said it will soon fix this in a software release.

"The reason the iPhone stores so much data is a bug we uncovered and plan to fix shortly," the FAQ says. "We don't think the iPhone needs to store more than seven days of this data."

Apple also admitted that users should be able to turn off the location logging feature on their phone when they disable location services on it. But a bug in the software has also prevented this, the company said.

Iin addition to collecting information about Wi-Fi hot spots and cell towers, Apple said it has been "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."

And Apple admitted as well that it is providing some anonymous information about users to third-party developers to help debug their apps--and may also provide information to marketers.

"Our iAds advertising system can use location as a factor in targeting ads. Location is not shared with any third party or ad unless the user explicitly approves giving the current location to the current ad (for example, to request the ad locate the Target store nearest them)," the company says.

Apple said it plans to release a software update in the next few weeks that will

reduce the size of the crowd-sourced Wi-Fi hot spot and cell tower database cached on the iPhone,

cease backing up this cache, and

delete this cache entirely when the Location Services feature is turned off.

And finally, Apple says that in the next major iOS software release, the cache will also be encrypted on the iPhone.