Apple broke its silence on Wednesday over accusations that the iPhone tracks users with an unencrypted file, saying the file is part of a crowd-sourced database of WiFi hotspots and cell towers. Apple said the file stores so much information — up to year of location data — because of a bug in its latest version of iOS. The company said it sees no reason to store data for more than seven days of the data and will fix the bug in an upcoming update.

Apple said the file that researchers Pete Warden and Alasdair Allan found is a subset of this data, which is used to help an individual handset determine where it is when using location-based services.

“Apple is not tracking the location of your iPhone. Apple has never done so and has no plans to ever do so,” the company said in a release.

Individual users cannot be located based on the data, the company said.

Apple said it will update its software to fix three issues in iOS 4: It will reduce the size of the database file on each individual handset, stop backing up the cache and delete the cache if users opt out of location services.

The company will also being encrypting the cache in its next major software release, making it more difficult to access the file should a phone fall into the wrong hands.

Related stories:

How to encrypt the iPhone tracking file

Your iPhone and iPad are tracking you, researchers say