mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-19 11:43:24 +01:00
Revert the retries here as these seem buggier
This commit is contained in:
@@ -33,8 +33,7 @@ final class DeactivateAppOperation: ResultOperation<InstalledApp>
|
|||||||
|
|
||||||
if let error = self.context.error
|
if let error = self.context.error
|
||||||
{
|
{
|
||||||
self.finish(.failure(error))
|
return self.finish(.failure(error))
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DatabaseManager.shared.persistentContainer.performBackgroundTask { (context) in
|
DatabaseManager.shared.persistentContainer.performBackgroundTask { (context) in
|
||||||
@@ -43,19 +42,13 @@ 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)
|
return self.finish(.success(installedApp))
|
||||||
self.progress.completedUnitCount += 1
|
} catch {
|
||||||
installedApp.isActive = false
|
return self.finish(.failure(error))
|
||||||
return self.finish(.success(installedApp))
|
|
||||||
} catch {
|
|
||||||
if (attempts == 0){
|
|
||||||
return self.finish(.failure(error))
|
|
||||||
} else { attempts -= 1 }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,19 +42,13 @@ final class RefreshAppOperation: ResultOperation<InstalledApp>
|
|||||||
|
|
||||||
DatabaseManager.shared.persistentContainer.performBackgroundTask { (context) in
|
DatabaseManager.shared.persistentContainer.performBackgroundTask { (context) in
|
||||||
print("Sending refresh app request...")
|
print("Sending refresh app request...")
|
||||||
|
|
||||||
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()
|
return self.finish(.failure(error))
|
||||||
try install_provisioning_profile(bytes.forRust())
|
|
||||||
} catch {
|
|
||||||
if (attempts == 0) {
|
|
||||||
return self.finish(.failure(error))
|
|
||||||
} else { attempts -= 1 }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
self.progress.completedUnitCount += 1
|
self.progress.completedUnitCount += 1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user