TAIPEI/ HONG KONG -- Soon after Tim Cook was hired by Apple's founder Steve Jobs in 1998 to whip the company's U.S.-focused supply chain into shape, he made a bold decision. Within two years he began shutting Apple's U.S. factories and outsourcing production to China.

His decision drove down costs and gave Apple the resources it needed to develop its next blockbuster products, the iPod and iPhone. It also created a competitive manufacturing base, capable of mobilizing hundreds of thousands of workers with just a phone call.

But eight years after Cook became CEO, this strategy is being called into question.

Not only has it left Apple dangerously exposed in the escalating trade war between Washington and Beijing, but the highly complex supply chain that Apple built in China over 20 years has given rise to one of its fiercest competitors: Huawei Technologies.

In late January it was revealed that the Chinese company only narrowly missed overtaking Apple as the world's second-largest smartphone maker in 2018, and is growing strongly despite an unprecedented industry slowdown.

But Apple's failure to diversify its production beyond China has tied it to a country where wages are rising, growth is slowing, and where Huawei has the advantage.

"The massive and complete supply chain ecosystem in China is key to the iPhone maker's success, but it has also created a gigantic organism that would struggle to move somewhere else," says Jeff Pu, a veteran analyst at Hong Kong-based GF securities.

Apple was not alone in rushing to China. But others, such as Samsung Electronics, recognized much earlier the risks of pooling all manufacturing in the country. Samsung, which expanded into China in the 1990s, began building a sizable manufacturing base in Vietnam from 2008.

Pu believes that Cook "chose to increase efficiency of the supply chain rather than looking ahead to potential risks."

Since taking on the top job in 2011, Cook has presided over an even deeper push into China, according to analysis by the Nikkei Asian Review. At the same time, there has been a greater shift of Apple's production away from its home market.

Apple says its top 200 suppliers account for 98% of total procurement spending. In 2017, the latest data available, roughly 75% of these suppliers had at least one production plant working for Apple in China, while 22% have three or more.

In total, its suppliers have 356 facilities in China producing parts or assembling products, Nikkei research found. That is over 7% higher than in 2012.

In comparison, the number of U.S. facilities operated by Apple's biggest suppliers plunged by 31% to just 57 factories between 2012 and 2017. Only six operate more than three U.S. sites. Apple insists it is still a big contributor to the U.S. economy, spending $60 billion last year with 9,000 U.S. component suppliers.

In the coming months Apple will publish its latest supplier list for 2018. This is unlikely to show a significant move away from China, say industry executives, despite the mounting tensions between Washington and Beijing in the second half of last year.

There is some evidence that Apple and its suppliers have for the first time in decades begun to think seriously about diversification. Nikkei's analysis shows a rise in facilities supplying Apple in India and Vietnam. But these are still a tiny proportion.

Meanwhile, major iPhone assemblers Foxconn, formally known as Hon Hai Precision Industry, and Pegatron are signaling plans to diversify production away from China. But so far the complicated processes and logistics required by Apple, and the iPhone in particular, make moving production difficult.

Industry experts say it would be a "mission impossible" to shift Apple's complex supply chain in time to mitigate the current downturn or the impact of Washington's trade battle with China. Apple's sales are already tumbling in China as consumers protest U.S. actions against national champion Huawei.

"It is impossible for suppliers to move away from China in just one night ... It might take at least 10 years and we still would not be done moving," Pegatron CEO S.J. Liao recently said.

The difficulty lies both in the complexity of iPhone manufacture, where much is still done by hand, and in the ecosystem of components, logistics and talent that has been built up in and around Apple manufacturing sites.

There is also China's generous system of government support to companies working for Apple, which has helped to keep suppliers' costs low and its margins high.

An investigation by The New York Times in 2016 detailed the benefits given by the city of Zhengzhou to Foxconn in 2010 for its vast new iPhone factory, which today churns out roughly half the world's iPhones. These included training and housing for workers, cheaper energy charges and discounts on labor charges, as well as tax breaks.

Pegatron's CFO Charles Lin has said his company has not been able to find any country that could replace China completely, even though they are pushing hard to diversify manufacturing.

Apple's dilemma is that its own high standards have created a uniquely competitive supply chain that would take years to replicate. "Apple is an extremely demanding customer ... Many [suppliers] struggled with achieving acceptable and economically viable yields, and many lost a lot of money in the process ... This forces the suppliers to develop capabilities that in many cases are quite extraordinary," Willy Shih, a professor of management at Harvard Business School, told Nikkei.

But those capabilities -- nurtured by Apple and driven by its rapidly growing iPhone sales over the last decade -- are not reserved for the U.S. company alone.

They have also helped to accelerate the development of China's homegrown technology companies and, in particular, Apple's most aggressive competitor, Huawei.

In 2012, the Chinese company had just 4% of the global smartphone market. By last year this had grown to 14.7%, while Apple over the same period saw its share drop from 25.1% to 14.9%.

Without access to the ecosystem of component makers, logistics companies and favorable customs arrangements that developed around Apple's Chinese factories, Huawei might have struggled to achieve such rapid growth, say industry insiders.

Now, its relentless investment in innovation and lower cost smartphones risks undermining the premium business model on which Apple's success is built.

"Apple helped to develop the supplier base in China for Huawei, Oppo, Vivo, Xiaomi, and earlier diversification [from China] might have helped these competitors less," Shih said.

Apple not only spawned a lineup of strong Chinese competitors. Its success has helped China to upgrade its tech industries.

Nikkei research shows that the U.S. still controls advanced semiconductors and critical materials used in Apple's devices. But Chinese factories provide almost everything else, such as displays, metal casings, audio components and batteries. In those fields, Chinese players are fast catching up on global rivals.

Apple, which began sourcing in China from foreign companies, is taking an increasing number of home grown suppliers into its fold. Between 2012 and 2017 the number of Chinese partners has risen from 10 to 27.

Many of these Chinese partners are also supplying its fiercest rivals.

Among those who play both sides of the competitive divide are Luxshare-ICT, a Shenzhen-based connector provider and AirPods assembler; Shenzhen Yuto Packaging Technology, a key packaging and printing service supplier; display maker BOE Technology Group; and touch panel and camera module provider O-film Technology.

All have grown exponentially since joining the Apple suppliers circle, thanks to a decade of rising orders from the U.S. company. But they have also leveraged the credibility won as Apple suppliers to provide products for China's Huawei and Xiaomi, among others, and are now competitors to market leaders LG Electronics, Japan Display and TPK Holding.

Cook has repeatedly insisted that Apple is no longer in China for reasons of cost. Now, it is about access to a deep pool of manufacturing talent and labor. "In the U.S. you could have a meeting of tooling engineers and I'm not sure we could fill the room," Cook once said. "In China, you could fill multiple football fields."

Cook's decision to seek out partners with vast plants in China gave his company the agility, cost savings and production capability he needed to build the unmatchable moneymaking machine that Apple has been for the last 10 years. In fiscal 2018, Apple earned a record $265.59 billion revenue, of which nearly 20% came from China. Cook has traveled to China 14 times since becoming CEO, in a sign of the importance he attaches to the market.

Apple has seen sales in China falter as tensions between Beijing and Washington heat up. (Photo by Kosaku Mimura)

But as the smartphone industry matures, the question of cost and pricing will become even more pressing. That change will make it very difficult for Apple and its Asian suppliers to maintain the same level of profitability, said Sean Kao, an analyst at research company IDC.

Apple did not comment on criticism over its sourcing strategy. However, it is clear a new approach is needed, industry experts say. The U.S. company will have to reduce its reliance on an increasingly costly and risky Chinese market.

Most of the company's top suppliers are talking to Apple about how to reduce the risks of staying in China, say industry sources with knowledge of the meetings. But none has yet worked out how to transfer Apple's complicated supply chain.

"The smartphone supply chain is the most complicated one in the world ... and it's the most difficult one to shift to anywhere else given its deep roots in China," Kao said.

Complicating matters, China still offers the best combination of infrastructure, supplier networks and labor flexibility, industry executives say.

"When you are making so much money, and the formula is work so well as it has for Apple for so many years, it's hard to change," Professor Shih of Harvard Business School said.