TAIPEI—For years, nearly all of the world's iPhones and iPads rolled off the assembly lines of a single company: Foxconn.

It was a famous partnership between two outsize personalities—Steve Jobs, Apple Inc.'s intense and mercurial co-founder, and Terry Gou, the Taiwanese manufacturer's equally demanding chairman.

But under current Chief Executive...