Apple has internal transfer pricing which is dictated by accounting regulations and tax law.
Companies try and set transfer prices to minimize local taxes, but need to follow regulations.
A phone made in China is “purchased” by say Apple Canada for some fraction the price it sells for - regulation usually require the Value to reflect the cost of inputs.
So Apple Canada might purchase a phone from Apple China for $600 CAD then turn around and sell it for $1200 CAD in Canada.
It’s the $600 that counts as a Chinese export to Canada.