By Che Pan and Eduardo Baptista

BEIJING, July 14 (Reuters) – China’s smartphone shipments fell 4.3% to 66 million ‌units in the second quarter from a year ‌earlier, as many manufacturers hiked prices to reflect rising memory and ​component costs, research firm IDC said on Tuesday.

It was the fifth straight quarterly decline, and first-half shipments were down 4.2% from a year earlier.

Huawei Technologies and Apple were ‌the only vendors ⁠to post growth in the quarter, with shipments up 19.4% and 24.4%, respectively.

“Huawei and Apple ⁠held their prices steady while competitors were raising theirs, and that gave hesitant buyers a reason to go ​ahead and ​purchase in a quarter ​when most of the ‌market was giving them a reason to wait,” said Arthur Guo, a senior analyst at IDC China.

Huawei ranked first with a 22.6% market share, while Apple came second with an 18.1% share. Xiaomi , which ranked fifth, saw ‌its second-quarter shipments down 21.7%, ​with Oppo and Vivo seeing ​shipments fall 9.7% and ​11.4%, respectively.

Most Android vendors raised prices or ‌cut back on budget models ​in response ​to surging memory chips and other component costs, discouraging consumers from upgrading. The fading effect of government ​subsidies also removed ‌a prop that had supported demand in earlier ​quarters, IDC said.

(Reporting by Che Pan and Eduardo ​Baptista; Editing by Kevin Buckland)