The development comes as the outgoing administration of U.S. President Donald Trump encourages U.S. firms to shift production out of China. During Trump's tenure, the United States has targeted made-in-China electronics for higher import tariffs, and restricted supplies of components produced using U.S. technology to Chinese firms it deems a national security risk.

Taiwanese manufacturers, wary of being caught up in the tit-for-tat trade war, have moved or are considering moving some production from China to countries such as Vietnam, Mexico and India.

Foxconn is building assembly lines for Apple's iPad tablet and MacBook laptop at its plant in Vietnam's northeastern Bac Giang province, to come online in the first half of 2021, the person said, declining to be identified as the plan was private.

The lines will also take some production from China, the person said, without elaborating how much production would shift.

"The move was requested by Apple," the person said. "It wants to diversify production following the trade war."

Foxconn said in statement: "As a matter of company policy, and for reasons of commercial sensitivity, we do not comment on any aspect of our work for any customer or their products".

Apple did not immediately respond to a request for comment.

Taiwan's Foxconn, formally Hon Hai Precision Industry Co Ltd, on Tuesday announced a $270 million investment to set up a new subsidiary called FuKang Technology Co Ltd - a move the person said was aimed at supporting the Vietnam expansion.

The contract manufacturer also plans to make television sets at the Vietnam plant for clients including Japan's Sony Corp, with the beginning of such production slated for late 2020 to early 2021, the person said. Sony declined to comment.

The factory will also make other electronic products such as computer keyboards, the person said.

According to Taipei-based research group TrendForce, all iPads are assembled in China and so Foxconn's move would mark the first time that the iPad has been made outside China.

Foxconn already plans to spend up to $1 billion expanding an iPhone assembly plant in India as "strongly requested" by Apple to diversify production beyond China, people with direct knowledge of the matter told Reuters in July.

It and peers such as Pegatron Corp are also considering building plants in Mexico, people with knowledge of the matter said, as Washington promotes near-shoring production.

Foxconn Chairman Liu Young-way in August told investors the Sino-U.S. trade war had split the world into two, saying his firm aimed to provide "two sets of supply chains".

Other iPad assemblers include Taiwan's Compal Electronics Inc and China's BYD Electronic International Co Ltd.

(Reporting by Yimou Lee; Additional reporting by Taipei newsroom, Brenda Goh in Shanghai and Makiko Yamazaki in Tokyo; Editing by Christopher Cushing)

By Yimou Lee