Apple has rebutted a report by state media which claimed a feature in the iPhone that tracks a user's location could be a national security threat. The technology giant said yesterday it did not track the locations of iPhone users and that it did not work with any government agency. The California-based company was "deeply committed to protecting the privacy" of all its customers, according to a statement on its website. "Apple does not track users' locations - Apple has never done so and has no plans to ever do so," it said. It was responding to a China Central Television report that claimed the "frequent locations" function, available on the iOS 7 mobile operating system, could collect data even when the function is turned off. Access to the data could help gain insight into the broader situation in China and "even state secrets", an interviewee told the broadcaster. The purpose of the function is to determine the places that are significant to users so as to provide them with personalised services, according to Apple. Frequent locations are only stored on a customer's device and not backed up on iTunes or iCloud, and are encrypted. "Apple does not obtain or know a user's frequent locations and this feature can always be turned off via our privacy settings," it said. Location data is encrypted by the user's passcode and is protected from access by any app. Only if a user enters their passcode successfully would they be able to see the data collected on their device, it added. Apple dismissed the idea it could threaten national security. "As we have stated before, Apple has never worked with any government agency from any country to create a back door in any of our products or services. We have also never allowed access to our servers. And we never will. It's something we feel very strongly about." In general, customers have control over the collection and use of all location data. They have to make the choice to enable location services in the phone's settings and give consent before any app is allowed to receive such information.