Donald Trump said he discussed the Iran war with Xi Jinping, while Washington warned Beijing against providing Tehran with intelligence, military equipment or other assistance.