Apple, which garners more than half its revenue outside the U.S., continued to expand sales in China in the three months through June despite escalating trade tensions between the Trump administration and Beijing.

Revenue from the world's second-largest economy grew 19 percent to $9.55 billion, the Cupertino, Calif.-based company said in a statement. The numbers show Trump's 25 percent tariffs on $34 billion of Chinese imports and President Xi Jinping's retaliation have yet to dint Apple's performance.

That could still happen, however, as economists and Republican lawmakers have cautioned Trump risks undermining the benefit's of last year's tax cuts with protectionist policies that have antagonized U.S. trading partners. The White House has threatened duties on as much as $416 billion more of Chinese goods while engaging in simultaneous disputes with allies such as Canada, Mexico, and the European Union.

Companywide, Apple's profit of $2.34 in its third fiscal quarter topped the $2.16 average estimate from analysts surveyed by FactSet. Net income climbed 32 percent to $11.5 billion on sales of $53.3 billion.

“We’re thrilled to report Apple’s best June quarter ever, and our fourth consecutive quarter of double-digit revenue growth,” said Chief Executive Officer Tim Cook, who has previously expressed optimism about the relationship between the U.S. and China.

The two nations "have this unavoidable mutuality where China only wins if the U.S. wins and the U.S. only wins if China wins and the world only wins if China and the U.S. win," he told investors earlier this year. "History shows us that countries that embrace openness and diversity do much, much better than the ones that are closed."

Cook told investors that several of the trade deals the U.S. has with other nations are in need of modernization, but noted that tariffs is the wrong approach.

"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," he said on the company's earnings call.

Cook said he hoped "calm heads prevail" in the ongoing dispute between China and the U.S.

The Cupertino, Calif.-based company's shares climbed 28 percent to $190.29 in the 12 months prior to Tuesday's earnings report.

Joe Williams contributed to this report.