BEIJING—China's influential state broadcaster on Friday called a location-tracking function offered by Apple Inc. 's iPhone a "national security concern," in the latest sign of a backlash in the country against U.S. technology firms.

In its national noon broadcast, state-run China Central Television criticized the "frequent locations" function in Apple's iOS 7 mobile operating system, which records time and location for the owner's movements. The report quoted researchers who said those with access to that data could gain knowledge of China's economic situation or "even state secrets."

Apple said in a statement titled "Your Location Privacy" that it doesn't track users or share their locations with outsiders. It said it created the "frequent locations" feature so users can "quickly and reliably determine their current locations for specific activities such as shopping, travel, finding the nearest restaurant or calculating the amount of time it takes them to get to work."

Apple said the location data is encrypted and stored locally on the device. The company said the tracking function can be disabled in the device's settings.

The CCTV broadcast represents a potential challenge for Apple in an increasingly competitive market. The Cupertino, Calif., company holds only a 6% share of China's smartphone market, according to research firm Analysys, while models made by Samsung Electronics Co. and others running Google Inc.'s Android mobile operating system command a greater share.