How Apple tied its fortunes to China