Earlier this month, Amazon, Apple, and Facebook each welcomed China's top Internet regulator to their headquarters, for visits marked by smiles and laughter.
Looking at photos from the meetings, it would be easy to think the companies have a cozy relationship with the world's most populous nation. In fact, 2014 was a lousy year for U.S. tech firms doing business in China, and next year may be no better.
For the past 12 months, Beijing has clamped down on foreign technology companies operating within its borders. New President Xi Jinping has overseen a new wave of protectionism that aims to strengthen China's own tech industry and guard against cybersecurity threats exposed by Edward Snowden.
U.S. internet firms have long struggled in China due to its strict censorship laws, but in 2014 the challenges spread to other parts of the tech industry, including software, networking, microprocessors and security tools.
"The feeling of frustration from foreign tech vendors is there -- that China doesn't want them," said Forrester Research analyst Bryan Wang.
Qualcomm could end up paying billions of dollars in fines over an anti-monopoly probe into how it licenses its patents in the country. Microsoft could face similar penalties in a different investigation into the way it distributes software.
As well as targeting companies for being too big and powerful, China is holding them back over cybersecurity concerns. The matter blew up last year when Snowden claimed the U.S. was tampering with network routers and other equipment to spy on Chinese businesses.
President Xi Jinping has come down hard. "Without cybersecurity, there is no national security," he declared in February, and assembled a government committee to protect the country from the perceived cyberthreats.
Three months later, Beijing announced a "vetting system" intended to weed out IT products that pose security threats. Companies that fail to pass will be blocked from selling in China.
Earlier this month, China's top Internet official even lectured CEO Tim Cook on the need to keep Apple's products secure. The official, Lu Wei, said all new products entering China will be checked for security.
"China will treat Apple and its tech products fairly, like any other company," the state-run Xinhua News Agency reported at the time. "But on the precondition that it must guarantee the protection of Chinese consumers' privacy and information."
The new focus on security is already hitting U.S. vendors that sell to state-owned companies, said Jimmie Chang, a Gartner analyst. "The Chinese government is encouraging more use of domestic products," he said.
Earlier this year, a procurement office began banning government purchases of some Windows 8 systems. Other vendors, including Cisco, IBM and Oracle. are struggling to attract orders from state-owned businesses, Chang said.
Sign up for CIO Asia eNewsletters.