Apple on Thursday removed an app from its online store that enables Hong Kong protesters to monitor and track police movements – an abrupt reversal that followed scathing criticism for the tech giant from Chinese media and mainland online platforms.

Apple said the company was removing the app as it had verified with Hong Kong authorities that it had been used “to target and ambush police, threaten public safety, and criminals have used it to victimise residents in areas where they know there is no law enforcement”.

HKmap.live relies on crowdsourced information to track police movements on a regularly updated map. Apple had initially rejected the app, saying it encouraged illegal activity and the evasion of law enforcement, but the company had a change of heart and approved it at the weekend – and it quickly became the most downloaded travel app in Hong Kong.

The People’s Daily, the Chinese Communist Party’s flagship newspaper, said the app was a “betrayal of the Chinese people’s feelings” and the company’s “recklessness will cause a lot of trouble for Apple”. Online there were widespread calls for a Chinese boycott of Apple products, the firm’s second largest market after the US.

Apple is the latest in a string of corporations to have fallen foul of Beijing, trying to navigate the political minefield between the mainland, Hong Kong and Taiwan.

Earlier this week, China pulled broadcasts of basketball games and sponsors cancelled contracts after the Houston Rockets manager tweeted support for the Hong Kong protesters.

In others moves apparently aimed at appeasing Beijing, Apple recently deleted the US news app Quartz from the Chinese online store, saying it “includes content that is illegal in China”, and withdrew the Taiwan flag emoji in a software update in the region.

China considers the self-ruled island a renegade province that it will take back under its control, by any means necessary.

Speaking in Taipei on Thursday, President Tsai Ing-wen struck a forceful tone as the island readies for elections, saying the ongoing Hong Kong unrest had shown the world the “one-country, two systems” model was a failure and she would never accept it for Taiwan.

“Hong Kong is on the verge of chaos due to the failure of ‘one country, two systems’,” she said.

Polarised city

Rejecting that framework was “the biggest consensus among the 23 million people of Taiwan regardless of party affiliation or position”, she said. “When freedom and democracy are challenged and [our] existence threatened, we must stand up and defend ourselves.”

In Hong Kong this week, in an incident that illustrates how polarised the city has become after four months of increasingly violent pro-democracy protests, a taxi driver who drove through a throng of protesters last weekend has been rewarded with a payment of HK$520,000 (€60,000) by a pro-Beijing group.

Henry Cheng, the 59-year-old taxi driver, injured several demonstrators and left one girl in hospital with a broken leg. Protesters believe he drove into the crowd intentionally, but later he said he had slipped out of control. After his car crashed into a shopfront and finally came to a standstill, he was beaten by the mob and his car was vandalised.

A reviled figure for the protesters, he has become a hero for the pro-Beijing camp and a string of high-profile visitors have brought him gifts in hospital, including the cash amount that was offered by a group calling itself Safeguard HK.