[AltBackup]: restore dropped changes

This commit is contained in:
Magesh K
2024-12-25 19:20:32 +05:30
parent e01e31f3d5
commit 2c29e3f902

View File

@@ -81,10 +81,22 @@ struct BackupError: ALTLocalizedError
var errorFailure: String?
var failureReason: String? {
return self.code.errorFailureReason
switch self.code
{
case .invalidBundleID: return NSLocalizedString("The bundle identifier is invalid.", comment: "")
case .appGroupNotFound(let appGroup):
if let appGroup = appGroup
{
return String(format: NSLocalizedString("The app group “%@” could not be found.", comment: ""), appGroup)
}
else
{
return NSLocalizedString("The AltStore app group could not be found.", comment: "")
}
case .randomError: return NSLocalizedString("A random error occured.", comment: "")
}
}
// Conforming to the userInfo required by ALTLocalizedError
var errorUserInfo: [String : Any] {
let userInfo: [String: Any?] = [NSLocalizedDescriptionKey: self.errorDescription,
NSLocalizedFailureReasonErrorKey: self.failureReason,