mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
[AltBackup]: restore dropped changes
This commit is contained in:
@@ -81,10 +81,22 @@ struct BackupError: ALTLocalizedError
|
|||||||
var errorFailure: String?
|
var errorFailure: String?
|
||||||
|
|
||||||
var failureReason: 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] {
|
var errorUserInfo: [String : Any] {
|
||||||
let userInfo: [String: Any?] = [NSLocalizedDescriptionKey: self.errorDescription,
|
let userInfo: [String: Any?] = [NSLocalizedDescriptionKey: self.errorDescription,
|
||||||
NSLocalizedFailureReasonErrorKey: self.failureReason,
|
NSLocalizedFailureReasonErrorKey: self.failureReason,
|
||||||
|
|||||||
Reference in New Issue
Block a user