US and Iran have announced a framework agreement to resolve their conflict, aiming for a formal signing in Switzerland