Apple Inc.'s latest smartphone lineup won favorable reviews from Chinese consumers thanks to its competitive pricing, although supply constraints and competition from local brands remain challenges in one of Apple's most important markets.

The Cupertino, California-based company showed four iPhone 13 models Tuesday at its annual September product introduction. They adhered closely to previous designs but included improvements in camera functions, processing power and battery life.

In China, consumers latched onto the comparatively low price of the latest iPhones, which cost about as much as iPhone 12s did a year ago.

By Wednesday morning, the topic "iPhone 13 price" had garnered more than a billion views on the Twitter-like social-media platform Weibo. Some internet users drew on a similarly named Chinese spice brand to make a punning comment that "thirteen is delicious."

China accounts for about one-fifth of iPhone sales, according to analyst estimates, making it a critical part of Apple's success.

Apple kept prices in place despite rising costs for raw materials and electronic components that have driven up the prices of other consumer goods.

The least-expensive model in the new lineup, the $699 iPhone 13 mini with a 5.4-inch screen, has 128 gigabytes of memory and costs the same as the 64-gigabyte iPhone 12 mini did when it was introduced a year ago.

"What attracts me here is getting more capacity for the same price or even lower," said Deng Yu, a 32-year-old media worker in the central Chinese city of Changsha.

Mr. Deng is buying a new iPhone for his wife, whose current iPhone XR has lasted for about three years.

Lu Yiyang, a 40-year-old pharmaceutical researcher in Shanghai who has decided to buy a new iPhone 13 mini, said he liked the new colors such as pink but didn't see anything special in the other new features.

The iPhone 12 had a banner year in China, in part because it was the first to offer ultrafast fifth-generation, or 5G, cellular-data service.

Apple is also benefiting from the troubles of its most important local rival in China for the premium smartphone market, Huawei Technologies Co.

Huawei was hit by U.S. sanctions last year that restricted the company's access to the most advanced semiconductors and squeezed its smartphone production. Since then, sales have plummeted.

"You cannot find Huawei phones out in the market," said Mengmeng Zhang, a Beijing-based analyst with Counterpoint Research. "There will be a lot of users who if they want to buy a premium phone, their only option is to buy from Apple."

In a June report, Morgan Stanley analysts said they expected China's smartphone market to grow by 6% this year.

A survey by the brokerage found that more than 30% of potential Huawei smartphone owners said they would opt for an iPhone if Huawei was unavailable.

Other Chinese brands still pose a challenge to Apple, especially with the Beijing government promoting nationalist sentiments. Brands such as Vivo, Oppo and Xiaomi — which make up the top three in China, followed by Apple — typically cost less than an iPhone and offer features aimed at local consumers.

Xiaomi Corp., in particular, is also a threat to Apple globally.

In this year's April-June quarter, Xiaomi overtook Apple as the second-largest smartphone maker in global shipments behind Samsung Electronics Co., thanks to strength in regions such as Latin America, Africa and Western Europe, according to research firm Canalys.

Apple is vulnerable to shortages of semiconductors and other parts.

Chief executive Tim Cook said in July that the supply constraints, made worse by Covid-19 outbreaks at production hubs, would extend to smartphones during the quarter ending September, following earlier warnings about the impact on iPad tablets and Mac computers.

The new high-end iPhone 13 models with memory of up to one terabyte are heavy users of semiconductors.

"Right now, Apple's biggest challenge is still that some components will be impacted by the Covid-19 pandemic and lead to tight supply, but we expect the scope of the impact to be limited," analysts at Taiwan-based research firm TrendForce said in a report.

They said they expected iPhone production to increase 15.6% this year.

Meanwhile, trade and military tensions persist between the U.S. and China, and Apple has done little to pare down its reliance on contract factories in China to assemble its products.

In early 2019, Apple asked some important suppliers to prepare feasibility studies about shifting capacity to other Asian countries such as Vietnam and India, according to people familiar with the matter.

They said the pandemic has disrupted such plans because strict controls on international travel make it hard to lay the groundwork for moving assembly lines.