Beijing: Apple Inc. has revealed plans to set up two more research hubs and boost investment in China, a pivotal market in which the iPhone has been rapidly elbowed aside by local rivals.

The announcement comes as chief executive officer Tim Cook undertakes his latest trip to a country that ranks as Apple’s single biggest overseas market. Apple said it plans to build new research facilities in the eastern Chinese cities of Shanghai and Suzhou, on top of centers already slated for Beijing and the southern city of Shenzhen. It also pledged to spend at least ¥3.5 billion ($507 million) on research institutions.

All four centers will open later this year, the company said in a statement on its Chinese website. They will help Apple cooperate with local partners and attract talent from its local suppliers as well as from top educational institutes, according to its press release.

The announcement came a day before Cook is scheduled to address a high-profile economic forum in Beijing, where senior government officials will confer with the heads of some of the world’s biggest corporations, including Royal Dutch Shell Plc and Saudi Arabian Oil Co.

Foreign companies have a long-established tradition of building research bases in China to both signal their commitment to the country and curry favour with the government. Apple’s announcement comes after iPhone shipments fell for the first time in China on an annual basis, in 2016.

China had for years driven Apple’s spectacular growth, even as smartphone demand elsewhere faltered. But local vendors like Huawei Technologies Co., Oppo and Vivo are now eroding its market share with increasingly high-end devices. The US company is counting on the release of the 10th anniversary iPhone later this year to supercharge growth. Bloomberg