Apple announced plans to set up a second R&D centre in China next year as it moves to strengthen its relationship with partners and turn its fortunes around in the mainland.

The facility will be set up in Shenzhen, the southern electronics manufacturing hub, where its outsourcing partner Foxconn is based.

Apple chief executive Tim Cook announced the plan at a meeting with officials from Shenzhen, the Shenzhen Economic Daily reported. Foxconn chief executive Terry Gou also attended the meeting.

Apple said in August it was building its first R&D centre in China, with plans to complete the Beijing project by the end of the year. The facility will house the company’s operations and engineering teams and will expand its ties with partners and universities.

The iPhone maker has run into a number of challenges this year in China, its second largest market, where demand for iPhones has dropped sharply and it has faced a series of legal and regulatory hurdles that continue to weaken its competitive position in the country.

Its revenue in Greater China, which includes Hong Kong and Taiwan, plunged 33 per cent to $8.8 billion in its fiscal Q3 ending 30 June. Its smartphone market share dropped to 10.8 per cent in May, putting it in fifth place, as it faces increased competition from local brands. The iPhone’s market share was 17.8 per cent in Q1 2015, when it was the top-ranked smartphone vendor in China, according to Counterpoint Research.