Apple CEO Tim Cook. AP After Chinese state media said earlier this week that Apple's iPhones were a threat to national security because of their ability to track and time-stamp user locations, the company released a statement on its Chinese website denying that any user data is at risk.

"Apple is deeply committed to protecting the privacy of all our customers," the company writes. "Privacy is built into our products and services from the earliest stages of design. We work tirelessly to deliver the most secure hardware and software in the world."

The Chinese report concerned the iPhone's "Frequent Locations" feature — which was introduced with iOS 7 and uses location data for both Maps and Weather — and said that sensitive data could reveal the country's economic situation and "even state secrets."

Apple explained in its message that the location data is stored only on each phone, not on Apple's servers, and that all of it is encrypted. The company also tries to quash fears that it's working with the government to spy on iPhone owners.

"Apple has never worked with any government agency from any country to create a backdoor in any of our products or services," the statement says. "We have also never allowed access to our servers. And we never will. It’s something we feel very strongly about."

[Hat-tip to 9to5Mac where we first saw this story.]

Here's the full letter: