The above button links to Coinbase. Yahoo Finance is not a broker-dealer or investment adviser and does not offer securities or cryptocurrencies for sale or facilitate trading. Coinbase pays us for certain activity generated through this link. Prices displayed are informational.

TAIPEI, July 5 (Reuters) - Taiwan's Foxconn, the world's largest contract electronics maker, reported a 39.8% year-on-year ‌rise in second-quarter revenue that beat market forecasts ‌on strong demand for AI products, though it cautioned about "volatile" global politics.

Revenue ​for Nvidia's biggest server maker and Apple's top iPhone assembler jumped to T$2.513 trillion ($78.71 billion) in the April-June quarter, Foxconn said in a statement on Sunday.

That was above ‌a T$2.372 trillion LSEG ⁠SmartEstimate, which gives greater weight to forecasts from analysts who are more consistently accurate.

Strong ⁠AI demand led to robust revenue growth for its cloud and networking products division, while smart consumer electronics, which ​includes iPhones, ​posted "significant" growth, the company said.

June ​revenue alone rose 52.1% ‌year-on-year to T$821.8 billion, a record for that month.

Operations are expected to grow both quarter-on-quarter and year-on-year in the third quarter, with AI racks maintaining a growth trend, the company said.

However, "it remains necessary to monitor the impact ‌of the volatile global political ​and economic situation", Foxconn said, without ​elaborating.

Foxconn, formally called ​Hon Hai Precision Industry, does not provide numerical ‌forecasts.

The company's shares have gained ​4.3% this ​year, underperforming the 61.5% rise for the Taiwan market.

The stock closed up 0.6% on Friday ahead of ​the revenue data ‌release. The benchmark index ended the day flat.

($1 = ​31.9260 Taiwan dollars)

(Reporting by Ben Blanchard; Editing by ​William Mallard and Jamie Freed)