Trump says Iran has agreed to refrain from creating or buying nuclear weapons, but warns he could end talks and resume military action if needed.