Apple is shifting more money into China despite a series of setbacks in the huge but tricky market. 

During a visit to Beijing, Apple’s CEO Tim Cook said the tech giant plans to open its first research and development center located in China by the end of this year.

The company's sales in the China region fell by a third last quarter, but Cook has continued to talk about the long-term prospects in the Chinese market.

The new research center will combine Apple's "engineering and operations teams in China as we develop advanced technologies and services for our products," the tech firm said in a statement.

Apple didn't provide information on where exactly in China the facility would be located, how many people it would employ or the size of the investment.

Cook made the announcement at a meeting Tuesday with a top Chinese official, Vice Premier Zhang Gaoli, according to the country's official news agency Xinhua.

Zhang "called on U.S. companies to increase their investment and expand the industrial chain of their business," the report said.

But his appeal comes as global business groups have warned about planned Chinese cybersecurity rules that they say will put data security at risk and cut China off from the wider digital economy.

Apple has faced its own specific challenges navigating the Chinese market. The company had to close down its iBooks and iTunes Movies services in the country earlier this year after less than seven months of operation following pressure from regulators.

Meanwhile, local smartphone makers like Huawei and Oppo have been taking a bigger share of China's fiercely competitive market.