mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Remove buggy retry code finally
This commit is contained in:
@@ -39,21 +39,14 @@ final class DeactivateAppOperation: ResultOperation<InstalledApp>
|
|||||||
let allIdentifiers = [installedApp.resignedBundleIdentifier] + appExtensionProfiles
|
let allIdentifiers = [installedApp.resignedBundleIdentifier] + appExtensionProfiles
|
||||||
|
|
||||||
for profile in allIdentifiers {
|
for profile in allIdentifiers {
|
||||||
var attempts = 5
|
do {
|
||||||
while (attempts > 0){
|
try remove_provisioning_profile(profile)
|
||||||
print("Remove Provisioning profile attempts left: \(attempts)")
|
self.progress.completedUnitCount += 1
|
||||||
do {
|
installedApp.isActive = false
|
||||||
try remove_provisioning_profile(profile)
|
self.finish(.success(installedApp))
|
||||||
self.progress.completedUnitCount += 1
|
break
|
||||||
installedApp.isActive = false
|
} catch {
|
||||||
self.finish(.success(installedApp))
|
self.finish(.failure(error))
|
||||||
break
|
|
||||||
} catch {
|
|
||||||
attempts -= 1
|
|
||||||
if (attempts <= 0){
|
|
||||||
self.finish(.failure(error))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ final class EnableJITOperation<Context: EnableJITContext>: ResultOperation<Void>
|
|||||||
do {
|
do {
|
||||||
try debug_app(installedApp.resignedBundleIdentifier)
|
try debug_app(installedApp.resignedBundleIdentifier)
|
||||||
self.finish(.success(()))
|
self.finish(.success(()))
|
||||||
break
|
retries = 0
|
||||||
} catch {
|
} catch {
|
||||||
retries -= 1
|
retries -= 1
|
||||||
if (retries <= 0){
|
if (retries <= 0){
|
||||||
|
|||||||
@@ -41,19 +41,11 @@ final class RefreshAppOperation: ResultOperation<InstalledApp>
|
|||||||
guard let app = self.context.app else { return self.finish(.failure(OperationError.appNotFound)) }
|
guard let app = self.context.app else { return self.finish(.failure(OperationError.appNotFound)) }
|
||||||
|
|
||||||
for p in profiles {
|
for p in profiles {
|
||||||
var attempts = 5
|
do {
|
||||||
while (attempts > 0){
|
let bytes = p.value.data.toRustByteSlice()
|
||||||
print("Install provisioning profile attempts left: \(attempts)")
|
try install_provisioning_profile(bytes.forRust())
|
||||||
do {
|
} catch {
|
||||||
let bytes = p.value.data.toRustByteSlice()
|
self.finish(.failure(MinimuxerError.ProfileInstall))
|
||||||
try install_provisioning_profile(bytes.forRust())
|
|
||||||
break
|
|
||||||
} catch {
|
|
||||||
attempts -= 1
|
|
||||||
if (attempts <= 0) {
|
|
||||||
self.finish(.failure(MinimuxerError.ProfileInstall))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DatabaseManager.shared.persistentContainer.performBackgroundTask { (context) in
|
DatabaseManager.shared.persistentContainer.performBackgroundTask { (context) in
|
||||||
|
|||||||
@@ -45,21 +45,13 @@ final class SendAppOperation: ResultOperation<()>
|
|||||||
print("AFC App `fileURL`: \(fileURL.absoluteString)")
|
print("AFC App `fileURL`: \(fileURL.absoluteString)")
|
||||||
|
|
||||||
if let data = NSData(contentsOf: fileURL) {
|
if let data = NSData(contentsOf: fileURL) {
|
||||||
var attempts = 10
|
do {
|
||||||
while (attempts != 0){
|
let bytes = Data(data).toRustByteSlice()
|
||||||
print("Send app attempts left: \(attempts)")
|
try yeet_app_afc(app.bundleIdentifier, bytes.forRust())
|
||||||
do {
|
self.progress.completedUnitCount += 1
|
||||||
let bytes = Data(data).toRustByteSlice()
|
self.finish(.success(()))
|
||||||
try yeet_app_afc(app.bundleIdentifier, bytes.forRust())
|
} catch {
|
||||||
self.progress.completedUnitCount += 1
|
self.finish(.failure(MinimuxerError.RwAfc))
|
||||||
self.finish(.success(()))
|
|
||||||
break
|
|
||||||
} catch {
|
|
||||||
attempts -= 1
|
|
||||||
if (attempts <= 0) {
|
|
||||||
self.finish(.failure(MinimuxerError.RwAfc))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
self.progress.completedUnitCount += 1
|
self.progress.completedUnitCount += 1
|
||||||
self.finish(.success(()))
|
self.finish(.success(()))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user