Apple CEO Tim Cook made an unexpected appearance in Shenzhen Tuesday, using the trip to announce the company's second research and development center in China.

The announcement of the facility in Shenzhen came after an announcement about the technology giant's move to set up a $45 million R&D center in the capital city Beijing.

Apple's latest move comes as the iPhone maker looks to reverse falling sales and regulatory hurdles in China.

Cook has been on a charm offensive in China, visiting the country several times this year and meeting with top government officials. In May, Apple in Chinese ride-hailing service Didi Chuxing in a move it hoped would help it understand the Chinese market better.

Describing Shenzhen as an "incredibly vibrant city", Apple spokeswoman Carolyn Wu wrote in an email that that the company will open the city's R&D center next year.