Samsung is powering toward record profits thanks in part to Apple’s new iPhones. The two tech companies compete aggressively in high-end smartphones, but Samsung also provides key parts for Apple’s (AAPL) devices. The South Korean electronics maker said Friday it expects to pull in as much as 17.6 trillion won ($15.6 billion) in operating profit for the three months ended in September. That’s a jump of more than 20% from the same period a year earlier and Samsung’s highest quarterly earnings ever. The company didn’t provide a detailed breakdown of results yet, but analysts are ready to fill in the blanks. The bumper profit haul was likely driven by strong sales in memory chips and higher earnings in Samsung’s display and consumer electronics business, according to SK Kim, an analyst with investment bank Daiwa Capital Markets. The higher margins for flexible screens Samsung is supplying for the new range of iPhones helped boost earnings, Kim said. Business from Apple accounts for 25% to 30% of sales at Samsung’s display division, he added. The unit generated about 10% of the South Korean company’s 54 trillion won ($48 billion) profit last year. There are doubts about how long Samsung’s profits can keep hitting new highs. Analysts have been warning about slowing demand and a subsequent drop in prices for some memory chips, the business that drove a year-long streak of record profits at Samsung. And despite the blockbuster earnings Samsung forecast Friday, analysts expect the company to report disappointing smartphone sales for the third quarter, despite the release of a new flagship device, the Galaxy Note 9, in August. Samsung, the world’s largest smartphone maker, is suffering “a slowdown in many markets” compared with the same quarter last year, said TuanAnh Nguyen, an analyst at research firm Canalys. Competition from Apple and Huawei’s new flagship phones mean Samsung faces “tremendous challenges to remain strong” in the high-end market, he added. Samsung will report full results at the end of this month. Beyond smartphones and memory chips, another reason Samsung’s earnings were so hot last quarter was because South Korea was so hot — literally. A sweltering summer in the country fueled an increase in air-conditioner sales for Samsung’s consumer electronics division, according to Kim. Samsung shares closed flat in Seoul on Friday. The stock has fallen about 12% so far this year, weighed down by concerns about future demand for memory chips.