Tim Cook, CEO of the American technology giant Apple, is facing criticism at home over laudatory remarks he made about China during a recent visit to try to boost sagging iPhone sales in the lucrative market.

Cook was in Shanghai for the opening of China’s largest Apple retail store on Friday and met with Chinese political and business people. He praised China for being “so vibrant and so dynamic,” in remarks widely quoted by state media and Foreign Ministry spokesperson Hua Chunying.

The new Apple store took seven years and cost over 80 million yuan (roughly $11.1 million) to build. It is said to be the second largest in the world and the largest in Asia, and it is staffed by about 150 people.

Thursday evening, at least 12 hours before the scheduled opening, a long line had formed in front of the store. Some media said the crowds were “as bustling as New Year’s Eve.”

In addition to showing their loyalty to the brand by purchasing Apple products, the opening day crowds rushed to take photos with Cook, who was in the store at the event.

Dan Ives, a technology analyst on Wall Street, said on X, formerly Twitter, that Cook’s trip to China shows that Apple will continue to attach importance to the Chinese market.

“Apple is actually increasing its investments and retail footprint in China the past year,” he said, “and to this point Cook has been in China since last week on an important visit to lay the groundwork on Apple’s future in China. Cook reaffirming China strategy.”

Chinese media reported on Monday that Apple will cooperate with Chinese technology company Baidu to provide artificial intelligence capabilities to the iPhones sold in China this year. Baidu has not verified the report.

However, not all Chinese love Apple. A viral video clip on Chinese social media shows a middle-aged Chinese woman in yellow clothes, a baseball cap and a mask yelling at the people who queued up at the new Apple store the night before its opening, “You worship and favor foreign things.”

She also said Apple’s business expansion in China is “because of scum like you who are willing to pay for it.”

A person in the line said, “Do you know how many jobs Apple brings to China every year?”

The woman replied, “No need, we have our own Huawei!”

The drama reflects the challenges Apple is facing in China. IPhone shipments in China fell about 33% in February from a year earlier, according to official data, marking a second consecutive month of lower shipments.

In January, the company shipped a total of roughly 5.5 million units, or about 39% fewer handsets than in the prior year, according to China Academy of Information and Communications Technology figures.

Frank Lee, a senior partner of Blue Ocean Capital in Beijing, said that most Chinese iPhone users have a good experience with Apple products, so they remain loyal to the brand. However, there is a clear trend of declining sales of Apple products due to competition with Chinese domestic brands.

Lee told VOA, “I think Apple’s opening of a store in Shanghai will play a certain role in [boosting] its sales in China, but it cannot fundamentally reverse the overall slow decline trend of iPhones in China.”

However, Cook expressed his confidence in the Chinese market. He told the Chinese media, “I love the people and the culture [of China]. Every time I come here, I’m reminded that anything is possible here.”

Cook’s remarks have been criticized as glorifying the Chinese government’s arrogant treatment of private enterprises.

Jonathan Eyal, associate director of the Royal United Services Institute for Defense and Security Studies in the U.K., wrote on X, “‘Everything is possible’ in China, says Apple’s Tim Cook. Including being arrested and expropriated. And losing the market at a stroke of a bureaucratic pen.”

Theresa Fallon, director at the Centre for Russia Europe Asia Studies, wrote, “Apple chief Tim Cook’s obsequious praise for China … unlikely to reverse the tide and CCP mandates that government officials can’t use Apple phones.”

Bloomberg reported last year that a growing number of Chinese government agencies and state-owned enterprises were ordering employees not to bring iPhones and other foreign-brand phones to the workplace. China’s Foreign Ministry did not confirm the report.

Some observers believe Cook’s remarks were not sincere. In recent years, Apple has expanded its production in India. Last year, iPhones made in India appeared for the first time in the first batch of iPhone 15 models released globally.

However, others say China is irreplaceable to the global supply chain. They noted that Apple has faced challenges in efficiency since its supplier Foxconn moved production lines to India in the past couple of years.

Noah Smith, an American current affairs columnist, wrote, “LOLLLLLLL meanwhile he’s shifting production out of China as fast as he can.”

Some critics of Cook are more serious. Sophie Richardson, former China director at Human Rights Watch, said, “.@tim_cook, about those “vibrant” and “dynamic” #crimesagainsthumanity committed by your #China govt hosts…?”

Eli Friedman, associate professor of global labor and work at Cornell University, said the past mutually beneficial relationship between Beijing and American companies is no longer playing a diplomatic role.

He wrote, “Throwing Apple some treats will not help stabilize the U.S.-China relationship, I promise.”

Adrianna Zhang and Joyce Huang contributed to this report.