Apple is apologizing after some iPhone and iPad owners saw their devices rendered useless, and is issuing a patch to fix the so-called "error 53."

The patch is designed to restore devices that were disabled after failed attempts to update their operating systems to iOS 9.2.1.

Earlier this month, iPhone and iPad owners using their devices’ Touch ID fingerprint recognition system reported the gadgets were rendered useless after attempting to update iOS.

Apple explained that the problem occurred because the users had replaced their screens or their iPhone’s home button at “unauthorized” repair facilities – meaning anywhere other than an Apple Store or Apple service centre.

When the devices underwent a system check during the software update, the Touch ID sensor wouldn’t match the device's other components, causing the update to fail and prompting the “error 53” message.

On its support page, Apple explained that the system check was meant to keep devices and the iOS features related to Touch ID secure.

Apple suggested users force a restart of their devices and if that didn’t work, to contact Apple Support about "pricing information for out-of-warranty repairs."

The new patch issued Thursday should fix the problem. Users are being told to plug their devices into a PC or Mac, connect to iTunes, and then download the patch.

(Those who update their iPhones over the air via iCloud are not affected and did not encounter the error 53 message.)

In a statement to TechCrunch, Apple said the security check was intended for use at the factory and was never meant to affect customers.

“We apologize for any inconvenience, this was designed to be a factory test and was not intended to affect customers. Customers who paid for an out-of-warranty replacement of their device based on this issue should contact AppleCare about a reimbursement.”

With many iPhone and iPad users reporting they had lost all of their data after the error 53 message, or had been forced to buy new devices, a Seattle-based law firm announced it was launching a class-action lawsuit against Apple.

That law firm, PCVA, issued a statement Thursday saying it would be watching to ensure that all customers are fully reimbursed.

“We’re going to make sure that Apple follows through with its promises, but we appreciate that the company says it’s going to solve this problem and compensate its customers who were victimized by it. That’s good business,” lead attorney Darrell Cochran said in a statement.