PHOTO: Julianne Lindsey
Now playing
02:38
Gamer banned for supporting Hong Kong protests
WASHINGTON, DC - JUNE 22: Facebook
WASHINGTON, DC - JUNE 22: Facebook's Chief Operating Officer Sheryl Sandberg speaks with AEI president Arthur C. Brooks during a public conversation on Facebook's work on 'breakthrough innovations that seek to open up the world' at The American Enterprise Institute for Public Policy Research on June 22, 2016 in Washington, DC. (Photo by Allison Shelley/Getty Images)
PHOTO: Allison Shelley/Getty Images North America/Getty Images
Now playing
01:23
Hear Sandberg downplay Facebook's role in the Capitol riots
screengrab US social media
screengrab US social media
PHOTO: Getty Images
Now playing
04:35
Tech companies ban Trump, but not other problematic leaders
PHOTO: Samsung
Now playing
01:53
See Samsung's new Galaxy S21 lineup
PHOTO: CNN
Now playing
02:47
Extremists and conspiracy theorists search for new platforms online
This illustration picture shows the social media website from Parler displayed on a computer screen in Arlington, Virginia on July 2, 2020. - Amid rising turmoil in social media, recently formed social network Parler is gaining with prominent political conservatives who claim their voices are being silenced by Silicon Valley giants. Parler, founded in Nevada in 2018, bills itself as an alternative to "ideological suppression" at other social networks. (Photo by Olivier Douliery/AFP/Getty Images)
This illustration picture shows the social media website from Parler displayed on a computer screen in Arlington, Virginia on July 2, 2020. - Amid rising turmoil in social media, recently formed social network Parler is gaining with prominent political conservatives who claim their voices are being silenced by Silicon Valley giants. Parler, founded in Nevada in 2018, bills itself as an alternative to "ideological suppression" at other social networks. (Photo by Olivier Douliery/AFP/Getty Images)
PHOTO: Olivier Douliery/AFP/Getty Images
Now playing
03:49
Parler sues Amazon in response to being deplatformed
PHOTO: Twitter
Now playing
02:39
Twitter permanently suspends Donald Trump from platform
Panasonic
Panasonic's Augmented Reality Heads-up Display
PHOTO: Panasonic USA
Now playing
01:06
This tech gives drivers directions on the road in front of them
PHOTO: LG Display
Now playing
01:10
See LG's transparent TV
PHOTO: Twitter/@gregdoesthings
Now playing
02:06
Internet gets creative with empty iPhone boxes
NEW YORK, NY - JUNE 3: The Google logo adorns the outside of their NYC office Google Building 8510 at 85 10th Ave on June 3, 2019 in New York City. Shares of Google parent company Alphabet were down over six percent on Monday, following news reports that the U.S. Department of Justice is preparing to launch an anti-trust investigation aimed at Google. (Photo by Drew Angerer/Getty Images)
NEW YORK, NY - JUNE 3: The Google logo adorns the outside of their NYC office Google Building 8510 at 85 10th Ave on June 3, 2019 in New York City. Shares of Google parent company Alphabet were down over six percent on Monday, following news reports that the U.S. Department of Justice is preparing to launch an anti-trust investigation aimed at Google. (Photo by Drew Angerer/Getty Images)
PHOTO: Drew Angerer/Getty Images North America/Getty Images
Now playing
03:25
Google employee on unionizing: Google can't fire us all
Now playing
02:01
Watch 'deepfake' Queen deliver alternative Christmas speech
Now playing
01:42
Watch father leave daughter dozens of surprise Ring messages
PHOTO: Photo Illustration: Kena Betancur/Getty Images
Now playing
04:50
Zoom's founder says he 'let down' customers. Here's why
Now playing
00:48
See Walmart's self-driving delivery trucks in action
Now playing
01:25
This robotaxi from Amazon's Zoox has no reverse function
(CNN Business) —  

In the latest struggle for an American company to navigate the tricky waters of doing business in China, Apple CEO Tim Cook defended his company’s decision to pull a map app that Hong Kong protesters had used to track police.

In a memo to employees on Thursday, Cook said Apple removed HKmap.live from its App Store Thursday, because it had been used in ways that “endanger law enforcement and residents in Hong Kong.” The memo was anonymously posted on Pastebin, a website that allows people to post items without revealing their identities. The text was confirmed by a source with knowledge of the memo.

Hong Kong has been rocked by several months of protests from anti-government demonstrators. Cook told employees in the memo that the decision to scrap the app wasn’t easy, but Apple received “credible information” from Hong Kong officials and users of the app that HKmap.live was being “used maliciously.”

Some protestors were violently targeting people and property where police weren’t present, Cook said, noting the App Store bans apps that can be used for personal harm. He also noted the app violated Hong Kong law.

Apple “thoroughly reviewed” the situation before making the decision, Cook said.

The app used various emoji to communicate what was happening across Hong Kong: A dog marked where police officers were present; a police car showed where police vehicles were located; and a camera marked the location of a livestream.

A display of the app HKmap.live.
A display of the app HKmap.live.
PHOTO: Vincent Yu/AP

John Gruber, a widely respected tech blogger and Apple observer, criticized the memo. He wrote on Twitter that Cook’s letter was “both sad and startling” and dismantled the response on his website, questioning Cook’s evidence for his claims.

In a statement, Apple (AAPL) said Thursday the app had been used to target and “ambush” police and threaten public safety.

“Criminals have used it to victimize residents in areas where they know there is no law enforcement,” Apple said in an emailed response to CNN Business. Apple declined to further comment.

Google (GOOG) similarly pulled a role-playing game based on the Hong Kong protests from its app store on Thursday. The removal of the app was “not in response to a government request but because the app violated the Play Store’s policies,” a Google (GOOG) spokesperson said.

– CNN Business’ Sherisse Pham and Laura He contributed to this report.