Apple Inc.’s Tim Cook showed up at a Tencent gaming tournament in China, endorsing one of the biggest earners on the app store as uncertainty persists about the US company’s top overseas market.

The chief executive officer waved and made brief remarks to shoppers and staff during a surprise visit to Apple’s Taikoo Li store in the southwestern metropolis of Chengdu, according to a brief video posted on the social media platform Weibo. Cook thanked gamers who were vying for the top prize in Honor of Kings, Tencent Holdings Ltd.’s longest-running cash cow.

“The energy tonight was off the charts!” Cook wrote in a brief post in English and Chinese. It included video of fans playing the game, which was developed by Tencent’s TiMi studio.

Cook’s personal outing underscores the country’s importance to Apple, its biggest international market and the cornerstone of its manufacturing network. But he’s showing up at a time the US is ramping up sanctions to contain China’s semiconductor ambitions. 

Apple, for years China’s leading name in high-end gadgets, has had to contend of late with a rocky market as well as a growing preference for made-in-China brands like Huawei Technologies Co. 

The CEO turned up in Chengdu hours after a pair of research studies pointed to a disappointing start to sales in China for the iPhone 15, the latest version of a marquee device that underpins the majority of Apple’s global revenue. Sales of the flagship gadget were down 4.5% versus the iPhone 14 over their first 17 days after release, Counterpoint Research estimated in previously unreported figures provided to Bloomberg News.

The iPhone’s 15 debut came weeks after the launch of Huawei’s Mate 60 Pro, celebrated as a triumph over US sanctions because of its advanced made-in-China processor. In a sign of shifting sentiment, Cook’s Weibo musings during this particular trip attracted an unusual amount of vitriol. 

The CEO put up a photo of Chengdu’s nightscape he said was taken with an iPhone 15 Pro Max — the top of the range model. His feed was then flooded with complaints about the poor quality of the snapshot, as well as comparisons to pictures produced by the Mate 60 and other local devices.

Beijing has pledged this year to support private and foreign businesses, though criticism remains about the opacity of regulations. Apple’s launch also coincided with a government mandate to expand a ban on iPhone use to official agencies and state companies, underscoring its growing challenges there.

Cook’s itinerary is unclear. Global executives and heads of state are slated to convene in Beijing this week for the annual Belt and Road forum, a signature initiative of Xi Jinping’s that is regarded as key to the Chinese economy and diplomacy. 

He has continued to tout the strength of Apple’s China relationship. During a trip to the country this year, he called the partnership “symbiotic.” On Tuesday, Apple announced a 25 million yuan donation to a state-backed charity focused on rural development — one of Beijing’s main goals.

Back in March, Cook also paid at visit to the Shanghai headquarters of Genshin Impact creator Mihoyo, another key source of gaming revenue for Apple’s app store.