mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
restore changes dropped from altstore by 1713fcc
This commit is contained in:
@@ -20,6 +20,7 @@ final class DownloadAppOperation: ResultOperation<ALTApplication>
|
||||
|
||||
private let appName: String
|
||||
private let bundleIdentifier: String
|
||||
private var sourceURL: URL?
|
||||
private let destinationURL: URL
|
||||
|
||||
private let session = URLSession(configuration: .default)
|
||||
@@ -32,6 +33,7 @@ final class DownloadAppOperation: ResultOperation<ALTApplication>
|
||||
|
||||
self.appName = app.name
|
||||
self.bundleIdentifier = app.bundleIdentifier
|
||||
self.sourceURL = app.url
|
||||
self.destinationURL = destinationURL
|
||||
|
||||
super.init()
|
||||
@@ -111,7 +113,7 @@ private extension DownloadAppOperation {
|
||||
}
|
||||
|
||||
func download(@Managed _ app: AppProtocol) {
|
||||
guard let sourceURL = $app.url else { return self.finish(.failure(OperationError.appNotFound(name: self.appName))) }
|
||||
guard let sourceURL = self.sourceURL else { return self.finish(.failure(OperationError.appNotFound(name: self.appName))) }
|
||||
|
||||
self.downloadIPA(from: sourceURL) { result in
|
||||
do
|
||||
|
||||
@@ -263,6 +263,10 @@ extension FetchProvisioningProfilesOperation
|
||||
{
|
||||
throw OperationError.maximumAppIDLimitReached(appName: application.name, requiredAppIDs: requiredAppIDs, availableAppIDs: availableAppIDs, expirationDate: expirationDate)
|
||||
}
|
||||
else
|
||||
{
|
||||
throw ALTAppleAPIError(.maximumAppIDLimitReached)
|
||||
}
|
||||
}
|
||||
}
|
||||
//App ID name must be ascii. If the name is not ascii, using bundleID instead
|
||||
|
||||
@@ -78,6 +78,7 @@ extension OperationError
|
||||
static func openAppFailed(name: String?) -> OperationError {
|
||||
OperationError(code: .openAppFailed, appName: name)
|
||||
}
|
||||
static let domain = OperationError(code: .unknown)._domain
|
||||
|
||||
static func SideJITIssue(error: String?) -> OperationError {
|
||||
var o = OperationError(code: .SideJITIssue)
|
||||
|
||||
@@ -116,6 +116,8 @@ final class VerifyAppOperation: ResultOperation<Void>
|
||||
{
|
||||
throw error
|
||||
}
|
||||
let appName = self.context.app?.name ?? NSLocalizedString("The app", comment: "")
|
||||
self.localizedFailure = String(format: NSLocalizedString("%@ could not be installed.", comment: ""), appName)
|
||||
|
||||
guard let app = self.context.app else {
|
||||
throw OperationError.invalidParameters("VerifyAppOperation.main: self.context.app is nil")
|
||||
|
||||
Reference in New Issue
Block a user