First it was Google that succumbed to Chinese censorship, when in the name of revenue growth it was revealed that the company that would "do no evil" would offer a censored version of its browser in China (even as its employees reportedly revolted over the clandestine project), and now it is Apple's turn.

According to the WSJ, under pressure from Chinese state media, Apple said it removed illegal gambling apps from its App Store in China—a move that could help quell the latest challenge for the American tech giant in its most important market outside of the U.S.

The Apple store in Beijing

The Journal notes that Apple had been criticized by Chinese news outlets for "not doing enough to filter banned content and applications" and on Sunday, state broadcaster CCTV, which last month reported that Apple’s app store allowed illegal gambling apps disguised as official lottery apps, said that 25,000 apps had been removed.

“Gambling apps are illegal and not allowed on the App Store in China,” Apple said in a statement Monday. “We have already removed many apps and developers for trying to distribute illegal gambling apps on our App Store, and we are vigilant in our efforts to find these and stop them from being on the App Store.”

Apple offers more than 1.8 million apps in China, according to the Ministry of Industry and Information Technology. Apple didn’t confirm the number of apps it took down or when it had removed them, but 25,000 would amount to about 1.4% of that total.

To be sure, Apple occasionally cleans up its App Store in the U.S. as well, removing outdated or spam apps. But it's not remotely close to the enforced crackdown that Apple undergoes every so often in China.

Last year, In China, Apple said it removed nearly 700 virtual private networks, or VPN, apps from its App Store last year in response to new local restrictions. VPN is used by individuals and companies to send secure emails, transmit data and access websites blocked in China.

The state media attacks came at a vulnerable time for Apple, which like other U.S. companies operating in China, is caught in the middle amid growing trade friction between Washington, D.C. and Beijing. The purge follows just two weeks after China threatened Apple with "anger and nationalist sentiment" if the company doesn't share more wealth with its local employees: a clear warning that Apple may be a casualty should the US-China trade war escalate further.

As the WSJ further notes, U.S. companies are paying close attention to the messages they get from the Chinese government and the state media in this sensitive trade environment, said Ben Cavender, a director at China Market Research Group who focuses on consumer technology and retail.

“They are going to move very quickly to try to rectify that problem, because this is a situation where there could be a lot more backlash in the government in terms of regulations,” Mr. Cavender said. In its latest report on the app housecleaning, CCTV also said that illegal apps that were banned from the App Store would still be working on devices of users who had downloaded them. It also said that fake positive reviews for the illegal apps had misled some users. “Apple itself has set up the rules on how to allow apps onto its store, but it didn’t follow that, resulting in the proliferation of bogus lottery apps and gambling apps,” it said in its report.

Apple’s strong ties to China leaves it exposed should trade tensions ratchet up. China accounts for about one-fifth of its revenue. The Cupertino, Calif.-based company also assembles its iPhones in China, which means the iPhones are a Chinese export that could potentially be subject to tariffs in the trade row.

The bottom line: in order to preserve its precious Chinese revenue stream, Tim Cook will do anything China demands, although that may set up the company for a climatic showdown, when it is torn between conflicting demands from Trump and Xi. So far the company has been spared that particular dilemma.