US President Donald Trump departed China on Friday touting business deals that gave markets little to cheer, while Beijing warned Washington about mishandling Taiwan and said its war with Iran should never have started.

Trump's visit to America's main strategic and economic rival, the first by a U.S. president since his last trip in 2017, had aimed for tangible results to beef up his dented approval ratings ahead of crucial midterm elections.

The summit was filled with pageantry, from grand receptions with goose-stepping soldiers to lavish banquets and private tours of a secret garden, while Trump repeatedly heaped praise on his host, commenting on his warmth and stature.

"It's been an incredible visit. I think a lot of good has come of it," Trump told Xi at their final meeting at the Zhongnanhai complex, a former imperial garden housing the offices of Chinese leaders, before they dined on a menu of lobster balls and Kung Pao scallops.

But just before Friday's meeting, China's foreign ministry issued a blunt statement outlining its frustration with the United States and Israel's war with Iran.