Apple CEO Tim Cook says he is "optimistic" that the United States and China will be able to work out their differences over trade.Justin Sullivan—Getty Images

Apple CEO Tim Cook was loath to directly criticize President Donald Trump on Tuesday for enflaming trade tensions with China and expressed optimism that the situation would work itself out soon. But he warned that sometimes imposing tariffs can spiral out of control with “unintended consequences.”

“I can’t predict the future, but I am optimistic that the countries will get through this,” Cook said on a call with analysts after Apple released its latest quarterly results. “We are hoping that calm heads prevail.” Apple reported that its revenue increased 17% to $53.3 billion in the latest quarter.

President Trump’s administration said earlier this month that it was considering additional tariffs on $200 billion worth of Chinese exports. That would be the third round of tariffs imposed on Chinese goods and comes shortly after a tariff of 25% went into effect against $34 billion of Chinese products. While the tariffs wouldn’t hit for several more months, they would affect a much broader range of goods. But this week, reports emerged that talks to avoid the trade war with China might be restarted.

Apple’s products have not been directly impacted by the several rounds of tariffs have been imposed on goods like steel and aluminum traded between the U.S. and other countries, Cook said. But Apple (AAPL) is still reviewing whether it would be hit by the possible imposition of levies on the next wave of goods worth another $200 billion. “We’re going through that now,” he said.

The risk of tariffs causing a larger, global economic slowdown or currency price volatility that could hurt Apple is “very difficult to quantify and we’re not even trying to quantify that,” said Apple’s CEO.

Without mentioning Trump by name, Cook explained why he expected the trade war would deescalate soon. “There’s an inescapable mutuality between the U.S. and China that serves as a magnet to bring both countries together,” Cook said on Tuesday’s call. “Each country can only prosper if the other does. And of course the world needs both the U.S. and China to prosper for the world to do well.” The Apple CEO met with the president in April at the White House in a closed door meeting to discuss the trade situation.

In general, Cook said Apple was opposed to the use of tariffs, even when they are imposed to improve overall trade agreements. “Our view on tariffs is that they show up as a tax on the consumer and wind up resulting in lower economic growth and sometimes can bring about significant risk of unintended consequences,” Cook said. “That said, the trade relationships and agreements that the U.S. has between the U.S. and other major economies are very complex, and it’s clear that several are in need of modernizing. But we think that in the vast majority of situations, tariffs are not the approach to doing that.”