By James Clayton
North America technology reporter
There was a time when the US tech giants were all in China – even Facebook. Today, Apple's huge presence in the country looks increasingly conspicuous.
Last week Microsoft, which still operates in China, announced it was to shut down its social network, LinkedIn, there.
The company said having to comply with the Chinese state had become increasingly challenging – so it pulled the plug.
Apple has its own censorship problems in the country.
The BBC reported last week that two popular religious apps had been removed from Apple's App Store.
It later emerged that Amazon-owned Audible and the Yahoo Finance app had also been taken down.
Apple Censorship, a group that monitors the App Store, says it has seen an increase in apps that have been removed this month.
So what is going on?
It is notoriously hard to gauge what's happening behind closed doors in Beijing.
Still, what is becoming increasingly clear is that Apple and Microsoft are embroiled in a domestic battle between the authorities and the Chinese tech industry.
China has its own big tech titans – Tencent, Alibaba and Huawei – that are enormous global companies. But the Chinese government has grown worried about the power they wield.
American companies haven't been spared from the "great tech crackdown".
"The crackdown suggests that both Apple and Microsoft are very aware that their position is more tenuous than it's been in recent years. They know they need to walk carefully," says James Griffiths, author of The Great Firewall of China.
The straw that broke the camel's back for Microsoft appears to be a law due to come into force on 1 November – the Personal Information Protection Law (PIPL) – which would have required the company to comply with more regulation.
Microsoft alludes to it in a statement explaining its decision to pull LinkedIn: "We're facing a significantly more challenging operating environment and greater compliance requirements in China."
Graham Webster, editor-in-chief of the DigiChina Project at Stanford University, said: "I think they decided it just wasn't worth it."
Mr Webster links the decision to say goodbye to LinkedIn to forthcoming enforcement of the PIPL.
Apple, however, has a different set of priorities in China to Microsoft.
It is deeply entangled in the country, far more so than any other US tech company.
In the last quarter, Apple made nearly $15bn in revenue in China and Taiwan – an extraordinary figure.
Its global supply chain also depends on Chinese manufacturing. And to be in China, Apple knows it has to play by the country's rules – even if that means censorship.
You might ask: why doesn't Apple just sell hardware in China, and forget about the App Store?
The problem is, Apple believes the App Store and the iPhone are inseparable. It doesn't want to set a precedent of side-loading apps, where people can download apps on an iPhone away from the App Store.
For one thing, it would make considerably less money.
So if Apple is going to sell products in China, keeping the App Store operational in that country is deemed essential.
"Apple has been removing apps and essentially censoring the App Store in one way or another for years," Mr Webster says.
But Mr Griffiths argues that censorship has slowly grown stricter during Apple's time in the country.
"Apple has set itself a devil's bargain here," he says.
"Once you start to agree to remove apps, it doesn't really stop."
Other companies saw the writing on the wall earlier than Microsoft.
Google removed its search engine from China in 2010, after what it said was a Chinese hacking attack. The company said it was no longer happy to censor searches.
Rebecca Fannin, author of Silicon Dragons, believes Microsoft's pulling of LinkedIn now makes Apple a "big target".
But she thinks Apple is going to fight to stay in China.
"You know Apple is really one of the market leaders in China… I don't see Apple pulling out of China over any of these issues any time soon," she says.
What we don't know are the conversations that are going on behind closed doors between Apple and the Chinese authorities.
Perhaps Apple does push back, and maybe many apps are still up and live on the App Store in China because Apple stood up for them. We don't know.
Apple rarely comments on these stories, and points journalists to its human rights policy, which states it will follow the laws of the countries it operates in – even if it disagrees with them.
And in China, they've been doing just that.
When the authorities really want an app taken down, it gets removed.
Apple's presence in the country now feels almost like a hangover from another era. Big Tech simply doesn't have much of a presence in China any more.
The question now is how much regulation, how much compliance – and how much censorship – is too much?
Apple takes down Quran app in China
Microsoft shutting down LinkedIn in China
Apple criticised for storing data inside China
Apple censors engraving service, report claims
China exempt from new Apple privacy features
Apple executes New Year's Eve apps purge in China
Hitting 1.5C climate target 'very, very tough' – COP26 chief
As thousands are arriving for COP26, Alok Sharma says nations must "come together" to limit climate change.
'Moment of truth' as world meets at climate summit
G20 in final push to reach deal on climate
Can COP26 really save the planet?
‘As a child I saw the plane crash that killed my sisters'
Life where it's too hot to work, too hot to sleep
How the Taliban takeover changed my life
'I want to give my autistic son a voice'
Tiny pumpkins a smash hit for glassmaker. Video
A lifetime with the Yanomami. Video
Jailed three times for refusing to join the army. Video
The Tantra teacher giving millennials 'orgasms' in Singapore
15 sayings from around the world
© 2021 BBC. The BBC is not responsible for the content of external sites. Read about our approach to external linking.