China’s state media has accused Apple of endorsing and protecting “rioters” in Hong Kong’s increasingly violent protests by listing an app on its app store that tracks the movement of police in the city.

The condemnation, by the People’s Daily, a Chinese Communist party mouthpiece, appears to be China’s latest move to pressure foreign companies to toe the line after its state TV and Chinese companies cancelled collaboration with the US National Basketball Association over comments by a team official in support of Hong Kong’s protests.

The app HKmap.live, which crowdsources the location of police and anti-government protesters, was approved by Apple on 4 October and went on its App Store a day later, after the company reversed an earlier decision to reject the submission, according to an anonymous developer cited in the South China Morning Post. The app displays hotspots on a map of the city that is continuously updated as users report incidents, hence allowing protesters to avoid police.

The headline of the People’s Daily commentary carried by its official microblog on Wednesday said: “Protecting rioters – Has Apple thought clearly about this?”

It went on to say: “Allowing the ‘poisonous’ app to flourish is a betrayal of the Chinese people’s feelings.”

The HKmap.live is reportedly the most downloaded app under the travel category in the iOS App Store for Hong Kong.

Without specifically naming the app, the People’s Daily commentary said it allowed “Hong Kong rioters to openly commit crime while openly escaping arrests”. It said Apple’s approval of the app made it an “accomplice” in the protests because it “blatantly protects and endorses the rioters”. It questioned what the company’s intentions were.

It also criticised Apple for allowing Glory to Hong Kong – an unofficial anthem frequently sung by protesters during the ongoing anti-government movement – to be available for download in the Apple music store.

In what appears to be a threat to its access to the vast market in China, the commentary said Apple’s “mixing of political, commercial and illegal activities” is “unwise” and “imprudent” and would only “draw more turbulence” for the company.

Apple is the latest foreign company to get into trouble with China over the anti-government protests in Hong Kong, now in their 18th week.

Apart from NBA’s Houston Rockets general manager Daryl Morey’s tweet showing support for protesters, Tiffany & Co has removed a tweet of an advertisement showing a model covering one eye, believed to be a deliberate gesture of solidarity with injured demonstrators. The company said the image was actually created in May, before the protests started.

Apple has not immediately responded to a request for a comment.