Trump's attacks on Spain and Greenland overshadowed the NATO summit. He later praised alliance unity and reaffirmed US commitment.