HONG KONG — In the space of a week, Apple made a trio of changes to its phone software in Hong Kong that pleased the Chinese government but irked human rights advocates.

First, it removed the emoji for the flag of Taiwan, which China doesn’t recognize, from its operating system. Then, it banned media outlet Quartz, which had offered readers detailed accounts of the pro-democracy protests in Hong Kong. And on Wednesday night, it banned the HKmap.live app, which identified police locations, offering protesters a way to avoid the violent crackdowns underway.

It was Apple’s second reversal on HKmap.live, which it initially rejected and then allowed to appear in its App Store. The latest about-face came after the People’s Daily, the Chinese Communist Party’s official newspaper, said in a blog post this week that the app had “betrayed the feelings of the Chinese people.” The article accused the app’s anonymous developer of harboring malicious motives and queried whether Apple was an accomplice of “rioters.”

Removing the HKmap.live app “is just the latest incident of Apple caving to the Chinese government’s political pressure,” said Yaqiu Wang, a China researcher at Human Rights Watch.

Hong Kong’s Beijing-backed authorities have intensified a crackdown on demonstrators, who have taken to the streets to push for democracy and oppose Beijing’s tightening grip on the semiautonomous financial hub. The unrest has become increasingly violent in recent weeks, posing the most direct challenge to the rule of Chinese leader Xi Jinping.

Apple, which depends on access to cheap labor in China to manufacture its devices, has a long history of capitulating to the Communist Party there. In 2017, it removed virtual private networks, which allowed Chinese citizens to freely use the Internet, from its App Store in China. That same year, it removed the New York Times app at the request of the government. In 2018, it moved Chinese citizens’ iCloud accounts from U.S. servers to Chinese ones, giving the government there easier access to the data. Apple has said it is simply complying with local laws.

Apple’s move comes as U.S. businesses find themselves under pressure from China’s government over actions or statements perceived as contrary to the narrative of the ruling Communist Party. The pressure is particularly acute when it involves sensitive political issues such as the Hong Kong demonstrations.

In recent days, the National Basketball Association found itself the target of a furious nationalist backlash from Beijing after Houston Rockets General Manager Daryl Morey tweeted in support of the Hong Kong protesters. Blizzard Entertainment, meanwhile, suspended a professional gamer for a year for reportedly shouting “Liberate Hong Kong!” during an interview. Chinese tech giant Tencent owns a 5 percent stake in Blizzard’s parent company, Activision Blizzard.

The tension has highlighted some U.S. firms’ dependence on China while raising questions about their willingness to compromise on values such as freedom of expression to continue doing business in the country, where authorities tolerate no criticism of the ruling party. The experience also has shown the Chinese government’s preparedness to punish foreign companies that don’t toe its line.

In Hong Kong, other U.S. companies have found themselves on the opposite side of the coin. Starbucks outlets have been targeted by pro-democracy demonstrators because the Seattle-based chain’s local franchisee, Maxim’s, is seen as backing the Chinese government’s stance against the protests.

Hong Kong police didn’t respond immediately to a request for comment Thursday about their purported role in the HKmap.live app’s removal.

The app used crowdsourced information to publicize the locations of riot police, traffic disruptions, deployment of tear gas and other incidents related to the protests.

In a statement late Wednesday, Apple spokesman Fred Sainz said the company was contacted by “many concerned customers in Hong Kong” about the app. It investigated immediately and then “verified” with the Hong Kong police that the app had been used to “target and ambush police” and threaten public safety, adding that the program violated its rules.

Sainz declined to answer exactly what the customers in Hong Kong were concerned about, or whether the police offered any evidence of a crime being committed.

Wang, of Human Rights Watch, said Apple’s statement was “rather disingenuous,” because the Hong Kong police ultimately take orders from Beijing, she said. “We all know the Hong Kong government is not independent of the Chinese government. The reason Apple did it is because Apple has so much financial interest in China.”

Sainz declined to comment on whether any evidence was provided by the Hong Kong police.

To be sure, some protesters have resorted to violence in Hong Kong, but Wang said that it was somewhat laughable to think anyone would need an app to find police to ambush. Police can be found in Hong Kong by simple going out to dinner, she said. On the other hand, peaceful protesters are facing violent crackdowns from police, she said, giving them good reason to try to avoid them.

In a statement on Twitter on Thursday, the app’s developer said there was no evidence that it had been used to target police or threaten public safety. It stressed that moderators deleted comments that encouraged criminal activity.

Apple’s move, it said, was “clearly a political decision” designed to suppress freedom and human rights in Hong Kong.

Shibani Mahtani contributed to this report.