The ongoing Hong Kong protests has dragged Apple into the battle, after the company decided to remove a number of apps from the iOS App Store that protestors were using to help coordinate their protests and keep themselves safe.

One of the apps was which has been used by the public to track the police movements. Apple removed the app after it received a request from the Hong Kong authorities. The company cited that the app “has been used in ways that endanger law enforcement and residents in Hong Kong” as the reason for the removal.

This resulted in a massive backlash against Apple, with #BoycottApple trending on twitter.

Now Tim Cook has responded personally to the issue, defended their decision to remove the app.

In an internal letter to employees he said the decision to remove the app was based on “credible information” from both Hong Kong police and Apple users in Hong Kong that the app was used “maliciously to target individual officers for violence and to victimize individuals and property where no police are present.”

“This use put the app in violation of Hong Kong law,” Cook said. “Similarly, widespread abuse clearly violates our App Store guidelines barring personal harm.”

“National and international debates will outlive us all, and, while important, they do not govern the facts,” Cook wrote in his letter. “In this case, we thoroughly reviewed them, and we believe this decision best protects our users.”

Cook acknowledged that the app could be used for both good and ill, but their decision to side with the police against protestors on this occasion appears to be at odds with the company’s image of being a force for fairness and freedom.

Apple’s behaviour mirrors a number of other companies who ran into the reality of the difference between their stated ideals and their financial interest in China, with Google largely the unlikely exception who decided to leave the Chinese market instead of bending their principles.