mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
[cleanup]: remove unused code and renamed AltStore to SideStore in sources section
This commit is contained in:
@@ -81,7 +81,7 @@ struct SourceError: ALTLocalizedError
|
||||
var errorFailureReason: String {
|
||||
switch self.code
|
||||
{
|
||||
case .unsupported: return String(format: NSLocalizedString("The source “%@” is not supported by this version of AltStore.", comment: ""), self.$source.name)
|
||||
case .unsupported: return String(format: NSLocalizedString("The source “%@” is not supported by this version of SideStore.", comment: ""), self.$source.name)
|
||||
case .duplicateBundleID:
|
||||
let bundleIDFragment = self.bundleID.map { String(format: NSLocalizedString("the bundle identifier %@", comment: ""), $0) } ?? NSLocalizedString("the same bundle identifier", comment: "")
|
||||
let failureReason = String(format: NSLocalizedString("The source “%@” contains multiple apps with %@.", comment: ""), self.$source.name, bundleIDFragment)
|
||||
@@ -108,7 +108,7 @@ struct SourceError: ALTLocalizedError
|
||||
return failureReason
|
||||
|
||||
case .blocked:
|
||||
let failureReason = String(format: NSLocalizedString("The source “%@” has been blocked by AltStore for security reasons.", comment: ""), self.$source.name)
|
||||
let failureReason = String(format: NSLocalizedString("The source “%@” has been blocked by SideStore for security reasons.", comment: ""), self.$source.name)
|
||||
return failureReason
|
||||
|
||||
case .changedID:
|
||||
@@ -141,11 +141,11 @@ struct SourceError: ALTLocalizedError
|
||||
return failureReason
|
||||
|
||||
case .marketplaceNotSupported:
|
||||
let failureReason = String(format: NSLocalizedString("The source “%@” contains notarized apps, which are not supported by this version of AltStore.", comment: ""), self.$source.name)
|
||||
let failureReason = String(format: NSLocalizedString("The source “%@” contains notarized apps, which are not supported by this version of SideStore.", comment: ""), self.$source.name)
|
||||
return failureReason
|
||||
|
||||
case .marketplaceRequired:
|
||||
let failureReason = String(format: NSLocalizedString("One or more apps in source “%@” are missing a marketplaceID. This most likely means they are not notarized, which is not supported by this version of AltStore.", comment: ""), self.$source.name)
|
||||
let failureReason = String(format: NSLocalizedString("One or more apps in source “%@” are missing a marketplaceID. This most likely means they are not notarized, which is not supported by this version of SideStore.", comment: ""), self.$source.name)
|
||||
return failureReason
|
||||
}
|
||||
}
|
||||
@@ -186,7 +186,7 @@ struct SourceError: ALTLocalizedError
|
||||
return recoverySuggestion
|
||||
|
||||
case .marketplaceRequired:
|
||||
let failureReason = String(format: NSLocalizedString("AltStore can only install marketplace apps that have been notarized by Apple.", comment: ""), self.$source.name)
|
||||
let failureReason = String(format: NSLocalizedString("SideStore can only install marketplace apps that have been notarized by Apple.", comment: ""), self.$source.name)
|
||||
return failureReason
|
||||
|
||||
default: return nil
|
||||
|
||||
@@ -74,6 +74,10 @@ class UpdateKnownSourcesOperation: ResultOperation<([KnownSource], [KnownSource]
|
||||
UserDefaults.shared.recommendedSources = sources.trusted
|
||||
UserDefaults.shared.blockedSources = sources.blocked
|
||||
|
||||
// Cache trusted source IDs.
|
||||
UserDefaults.shared.trustedSourceIDs = sources.trusted.map { $0.identifier }
|
||||
|
||||
|
||||
self.finish(.success(sources))
|
||||
}
|
||||
catch
|
||||
|
||||
Reference in New Issue
Block a user