BEIJING — The editorial was scathing.

People’s Daily, the flagship newspaper of the Chinese Communist Party, was taking aim at Apple, accusing it of serving as an “escort” for “rioters” in Hong Kong by providing an app that allows protesters to track police movements.

“Letting poisonous software have its way is a betrayal of the Chinese people’s feelings,” warned the article, which appeared this week and was written under a pseudonym, “Calming the Waves.”

On Wednesday, Apple responded by removing the app — known as HKmap.life — from the iPhone store. It had approved the app’s sales just days before but said in a new statement that the company had realized that HKmap.life violated Apple guidelines “and local laws.”

“We have verified with the Hong Kong Cybersecurity and Technology Crime Bureau that the app has been used to target and ambush police, threaten public safety, and criminals have used it to victimize residents in areas where they know there is no law enforcement,” the statement said.