Taiwan's Foxconn, the world's biggest electronics contractor, reported an annual increase of 39.8% in second-quarter revenue that beat market forecasts driven by ​strong demand for artificial intelligence products, although the company 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 projected in 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-over-year to T$821.8 billion, a record for that month.