Tim Cook made an unexpected appearance in Shenzhen to announce the company’s second R&D center in China.