For many U.S. tech companies, access to the Chinese market requires walking a tightrope between the liberal principles they promote at home and the laws they must abide by in China. Yesterday, Apple CEO Tim Cook became the latest Silicon Valley executive to perform such a high-wire act, issuing a letter to employees defending the company’s decision to remove an app embraced by protesters in Hong Kong—and despised by Beijing.
“National and international debates will outlive us all,” Cook said in the company-wide email, verified by Reuters. “And, while important, they do not govern the facts. In this case, we thoroughly reviewed them, and we believe this decision best protects our users.”
The app in question, HKmap.live, made a brief appearance on the App Store this past week, where it shot to the top of download charts in Hong Kong. The app—which already operates browser and Android versions—allows users to drop pins on a map of Hong Kong at locations where they have sighted police, protesters or travel obstructions, such as blocked roads or tear gas.
However, days after the App Store approved HKmap.live’s listing, a vitriolic commentary from China’s state-owned People’s Daily entitled “Protecting Rioters: Is Apple Thinking Clearly?” said that allowing such “poisonous software to flourish is a betrayal of the Chinese people’s feelings” and warned the Cupertino-company that “this kind of foolishness and recklessness will cause much trouble for Apple.”
The next day, Apple removed HKmap.live from the App Store.
“The app in question allowed for the crowdsourced reporting and mapping of police checkpoints, protest hotspots, and other information,” Cook said in the employee email. “On its own, this information is benign. However, over the past several days we received credible information, from the Hong Kong Cybersecurity and Technology Crime Bureau, as well as from users in Hong Kong, that the app was being used maliciously to target individual officers for violence and to victimize individuals and property where no police are present.”
Criticism
Apple’s decision to remove the app has landed the company in the middle of a fiery debate about the value of free speech—a situation precipitated by the NBA’s apology for a tweet sent by Houston Rockets manager Daryl Morey in which he advocated “freedom” for Hong Kong.
The NBA’s apology read like a bid to save its business interests in China, which is valued at an estimated $5 billion and is now in jeopardy. Following Morey’s tweet, NBA China’s local partners all severed ties with the franchise and its China broadcasters are reviewing their relationship. However, at home, U.S. fans were angered by the NBA’s apparent capitulation and criticized the league for not supporting Morey’s right to free speech.
U.S. lawmakers piled similar criticism on Apple after news broke it had decided to remove the protest app from its App Store. Sen. Tom Cotton (R-Ark.) denounced Apple as “yet another capitalist who’ll sell rope to communists to hang us” while Sen. Ron Wyden (D-Ore.) accused Apple of having “sided” with “an authoritarian regime…violently suppressing its own citizens.”
Meanwhile Sen. Josh Hawley (R-Mo.) said that last week Apple told him its initial decision to ban the app was a mistake. “Looks like the Chinese censors have had a word with them since. Who is really running Apple? Tim Cook or Beijing?” Hawley said
Toeing the line
It’s no secret that a significant portion of Apple’s business comes from China. Last year, sales in Greater China—an area that includes Hong Kong, Taiwan and Macau, as well as mainland China—totaled $52 billion, or 20% of sales globally. To pursue business in China, the Californian company has had to comply with local laws, which has sometimes taken the company into morally-grey areas.
According to the South China Morning Post, Apple’s engraving service prohibits politically-sensitive words—such as “Xi Jinping” or “Taiwan Independence”—from being etched into iPhones; Apple has also removed the New York Times and, just this week, Quartz from its Chinese App Store, allegedly under direction from Beijing, which has blacklisted both publications.
While the above actions fall in line with Beijing’s laws on censorship, other steps taken by Apple appear to have less legal framing. For instance, Apple reportedly removed the Taiwanese flag emoji from iOS keyboards in Hong Kong and Macau through its latest updates. The flag had already been scrubbed from iOS in mainland China.
The decision to remove HKmap.live form the App Store this week comes at a tense moment, when attention from the U.S. on China’s moral standing is high—in part due to continued discussions on the trade war and in part, bizarrely, due to an episode of South Park. Employees of U.S. tech giants are also growing more confident in their ability to question the decisions of their employers.
Cook must have had this confluence in the back of his mind when he penned the memo to employees.
“These decisions are never easy, and it is harder still to discuss these topics during moments of furious public debate,” Cook wrote. “It’s out of my great respect for the work you do every day that I want to share the way we went about making this decision.”
More must-read stories from Fortune:
—Why WeWork’s failed IPO might not mean disaster for SoftBank after all
—Dyson pulls the plug on its plan to build an electric car
—Why Etsy sets a higher standard for diversity and inclusion in tech
—From porn to scams, deepfakes are unnerving business leaders and lawmakers
—A.I. remains a disruptive force in finance—even for fintechs
Catch up with Data Sheet, Fortune’s daily digest on the business of tech.