In his first big appearance on the global stage, the US President pledged to repair a relationship that had become strained under his predecessor.