Apple has sided with China a day after facing criticism from the country's state media and removed an app that helped Hong Kong protesters track where the police were.

According to media reports, Apple said it removed HKmap.live from its App Store a few days after it approved it. The reason: authorities in Hong Kong said the app was being used by protestors to find police and attack them.

RELATED: HONG KONG RIOT POLICE REPORTEDLY BUY 'ROBOCOP-STYLE' BODY ARMOUR FROM CHINA

China authorities says App helps target Hong Kong police

An editorial in People's Daily, the main newspaper of the communist party in China, said the app developers had "ill intentions" by providing the navigation service for protestors, which the editorial called rioters, and argued Apple's approval of the app "obviously helps rioters." The editorial went on to claim Apple appears to be acting as an "accomplice" in the protests.

"The map app is just the tip of the iceberg. In the Apple Music Store in Hong Kong, there was also a song advocating 'Hong Kong independence.' Such a song was once removed from the music store and has resurrected," wrote the editorial. "As a company with international influence, Apple has always enjoyed a high reputation. A company has its own standards of conduct, but should also have its social responsibilities. If Apple abandons its responsibilities and lets violent acts get worse, it puts more users at risk."

It went on to say that Apple is "mixing business with politics, and even illegal acts. Apple has to think of the consequences of its unwide and reckless decision."

Apple defends the removal of the app

In a statement, a day after the editorial appeared, Apple told the media it has verified with the Hong Kong Cybersecurity and Technology crime Bureau that the app has been used to target and "ambush" police. Apple went on to say the app threatens "public safety, and criminals have used it to victimize residents in areas where they know there is no law enforcement. This app violates our guidelines and local laws.”

Apple is just the latest multinational company to toe the line when it comes to China and the protests going on in Hong Kong. The NBA was at the center of a firestorm earlier this week after an executive with the Houston Rockets tweeted his support for the protestors. After facing intense criticism from the government of China and the cancellations of NBA games in the country the Rockets apologized. China has become one of the NBA's biggest markets.

Apple too has a lot to lose if it mucks it up with China. Almost all of its products are made in China and while it's struggling with smartphones in the country, it's still among its largest markets.