Western brands are having to work harder to win over customers in China.

Where American or European companies could once expect to find an enormous market hungry for their products, changing tastes and the challenge from new Chinese rivals are forcing them to adopt new strategies to succeed in the world's second biggest economy.

The sterner challenge facing big names such as Starbucks (SBUX) and Apple (AAPL) has nothing to do with the trade war. At least, not yet. It's about new competition and increased wealth.

"It doesn't work to just show up anymore," said Benjamin Cavender, a Shanghai-based analyst at consulting firm China Market Research Group, referring to brands that are household names in the West. "Chinese consumer tastes are evolving rapidly."

Coca-Cola (CCE) is one of the top companies that's having to adapt to this new reality.

"We've seen a tremendous change in the consumption patterns," Curtis Ferguson, the company's China CEO, told CNN at last week's World Economic Forum in the Chinese city of Tianjin.

Coke has launched more than 30 new drink brands in China in the past six months and now has about 275 in total, Ferguson said. They range from regular Coke to more exotic varieties with flavorings like yellow bean and apple fiber. Coke even has its own line of teas in China.

That's a big change from the Atlanta-based company's previous approach of relying on the strength of its brand.

The philosophy was "let them drink Coke," Ferguson said. He argued Western companies can't afford to treat their brands as sacrosanct.

"Either you destroy your own brand in China, or someone else is going to do it for you," he said.

Starbucks scrambles to keep up

Starbucks learned the difficulties of shifting Chinese consumer habits the hard way.

The coffee chain has about 3,000 stores in the country, making it one of its top markets. But in June, the company reported a sudden slowdown in growth in China, just weeks after it had announced plans for rapid expansion there.

That's partly because it faces growing competition from an upstart local competitor. Luckin Coffee opened its first store in China less than a year ago. Now it has more than 500. Many of its customers order coffees online for delivery or takeout. Chinese consumers are also increasingly turning to delivery apps, like Meituan Dianping, for food or drinks.

"Starbucks has always been slow adopting technology in China," Cavender said. Its customers "were tired of waiting in line to place orders."

The global coffee giant is now trying to correct course. In August, it teamed up with Alibaba (BABA), China's largest e-commerce company, to launch delivery services.

Automakers face 'big challenge'

Global carmakers are also scrambling to keep pace with changes in China's auto market, the world's biggest. It's being shaken up by the rapid spread of electric vehicles, which have been promoted through government subsidies, resulting in a crowded market.

Francois Provost, Asia-Pacific chairman of Renault (RNLSY), said the French carmaker is now fighting competition from both traditional rivals and new upstarts in China. Local player Nio (NIO), for example, sells an SUV in China that costs about half the price of Tesla's (TSLA) Model X.

Sticker price is crucial in China, Provost said, as most customers are first-time buyers. But drivers are also demanding electric vehicles with longer battery life as networks of charging stations are still being built out across the country.

"The big challenge is increasing the efficiency of the range and reducing user costs at the same time," Provost said during a panel discussion at the World Economic Forum. That will be tough for automakers, he predicts: "I can't honestly say we have full visibility on this."

Apple's losing the innovation race

Apple (AAPL) has lost market share in China to local rivals over the past two years. The iPhone accounts for less than 10% of smartphone sales in the country, analysts estimate. In the United States, it accounts for about 40%.

Apple is facing fierce competition from Chinese players such as Huawei, Oppo, Vivo and Xiaomi.

"In recent years, Apple has slid quite a lot in the Chinese market," said Canalys researcher Mo Jia. "The very aggressive tech innovation from Chinese brands is changing the high-end landscape."

The US company's latest models, the XS and XS Max, include features that could boost their appeal in the Chinese market, like dual SIM cards and a larger screen. But analysts are skeptical these will make much difference.

"Apple is fighting a bit of a losing battle," Cavender said.

-- Sherisse Pham and Rishi Iyengar contributed to this report.