Hon Hai Precision Industry Co., the maker of most of the world’s iPhones, posted earnings ahead of estimates after keeping production running despite component shortages and strict pandemic controls across China.

Apple Inc.’s biggest assembly partner reported net income of NT$29.5 billion ($989 million) for the quarter through March, outpacing the average projection for NT$28.5 billion. Revenue totaled NT$1.41 trillion, Hon Hai reported previously.

Hon Hai is the largest of a bevy of Apple-suppliers now struggling with prolonged component shortages and logistic bottlenecks resulting from China’s Covid-19 lockdowns. But the Taiwanese company, which makes everything from iPhones to Dell desktops and Sony PlayStations at its Chinese factories, has managed to keep its plants humming by employing closed-loop production sites. Hon Hai’s scale also grants it bargaining power with customers and suppliers.

The world’s largest contract electronics manufacturer said Thursday it expects revenue to remain little changed this quarter, given the uncertainty of China’s Covid measures. It anticipates strong growth in cloud and networking products even as its consumer electronics business may decline slightly, the company said in a presentation posted online.

While Foxconn’s sites in China are running stably, including key tech hubs in Zhengzhou and Shenzhen, the situation on the ground can change swiftly and unpredictably. Last Thursday, employees at MacBook maker Quanta Computer’s Shanghai plant flooded past isolation barriers, underscoring the depth of frustrations among residents subject to often abrupt lockdowns.

With consumer electronics facing a potential slowdown, the company has been making steps to diversify its business and move toward a new ambition: electric vehicles.

Its ambitions hinge on Lordstown Motors Corp.’s electric pickup trucks. Lordstown Motors said on Thursday it closed the sale of its Ohio EV factory to Hon Hai for $230 million. With the deal, Hon Hai plans to expand its customer base and establish its first EV production outpost in North America.

Chairman Young Liu said on a conference call that expanding its EV business is Hon Hai’s top priority, with the company targeting 5% market share in 2025. Its goal is to ship 500,000 to 750,000 EVs that year, he said.

Production at the Ohio plant is set to start in the second half of this year, while mass output from Foxconn’s EV factory in Thailand is set to start in 2024.