Headache? Tense nervous headache? Perhaps your name is Tim Cook . For poor Tim has woken up this Sunday morning with a giant headache, and its name is China.

Yesterday Apple removed all major VPN apps from its App Store in the country. These VPNs aided internet users there to get around the government’s vast system of censorship and access uncensored sources of media. But by doing so, Apple has clearly decided to put its business before the interests of the population, opposition leaders and activists.

For example, Golden Frog, which makes privacy and security software including VyprVPN, was just one of several providers who said its software had been unceremoniously dumped from the App store. This was even after the company had supported Apple in their backdoor encryption battle with the F.B.I. last year. There’s loyalty for you.

Another, ExpressVPN, a provider based outside of China, said “all major VPN apps” including its own had been purged from Apple’s China-based store. Apple had told them that its app was removed because “it includes content that is illegal in China.” That’s semantics. The ‘illegal content’ referred to is the operation of an unlicensed VPN, a requirement which came in January. Will China ever license a VPN for users to circumvent its censorship? I think you can think of the answer to that one.

This is no small matter. This is the first time China has won the battle to pressure a major foreign tech platform to get rid of software that helped people tunnel out of China’s restrictive version of the Internet.

Is it as simple as that? This is where Tim’s headache comes in. Apple’s business in China is huge, but under pressure.

Apple’s Chinese market share and shipment volume fell for the first time last year. According to market data from IDC for 2016, Apple had a year-on-year decline in China with the tech giant’s shipments volume to China falling from 58.4 million units in 2015 to 44.9 million in 2016. Its market share dropped 4 points to 9.6 percent, even as the whole Chinese smartphone market actually grew 9 percent for the full year.

China’s leading phone vendors OPPO, Huawei and vivo are happily breathing down Tim’s neck in the ever-quickening pace of China’s mobile market.

Furthermore, this year research came out that said Apple was at risk of falling out of the top 5 smartphone vendors in China, with local brand Xiaomi snagging the fourth-place spot that was previously held by Apple, according to Canalys. The next iteration of the iPhone could help it revive its influence, but that remains to be seen. Meanwhile, Xiaomi, Huawei and others are building out their own Siri competitors, which, as Amazon Alexa has shown, is one of the next waves of computing.

So we can see where Mr Cook is under pressure. China is Apple’s second market after the US and has far more potential for growth. To stay in the country he must walk a delicate balancing act with the famously restrictive authorities, while growing sales.

But, like a captain navigating his ship between two large rocks, he’s about to get well and truly stuck.

Apple can’t afford to pull out of China, and in theory it can’t afford to piss-off the government by allowing access to unlicensed VPN apps.

That leaves those that want to ‘see’ outside of China via a phone needing to either jailbreak their iPhones or switch to version of Android with less oversight. The GreatFire company offers ‘censorship-proof’ alternatives like its Android VPN FreeBrowser. But the pickings in this area are slim.

Google doesn’t have quite the same political headache as Apple. It can always take the “we can’t control all these Android flavours as easily, sorry guys!” approach.

But perhaps the biggest headache Tim has is that Apple not have a leg to stand on when it is once again confronted with governmental censorship elsewhere.

How will Apple now argue against the Trump administration effectively, after cow-towing to China in this fashion?

When next Apple must face-off with this intransigent White House over criminality or terrorism attacks at home, any protestations they make will be empty after their capitulation in China.

There is really only one way out: Apple should have stood its ground. It should have relied on its standing in the market as the provider of the most sought after, premium, mobile device.

If the indications are anything to go by, Apple’s entrance into AR & VR could make the next iPhone the hottest device since the first one. Why not make a government think twice before attracting the intense ire of their tech-hungry populations?

In sticking to its principles, Apple would have been able to hold its head high in the US and globally. It could have maintained its brand values amongst its devoted user-base around the world.

What’s the name of the pill to cure Tim’s oncoming headache? Its called resolve.