Remove buggy retry code finally

This commit is contained in:
nythepegasus
2023-10-17 17:37:29 -04:00
parent 0deae92829
commit c5b8cb4459
4 changed files with 21 additions and 44 deletions

View File

@@ -39,21 +39,14 @@ final class DeactivateAppOperation: ResultOperation<InstalledApp>
let allIdentifiers = [installedApp.resignedBundleIdentifier] + appExtensionProfiles
for profile in allIdentifiers {
var attempts = 5
while (attempts > 0){
print("Remove Provisioning profile attempts left: \(attempts)")
do {
try remove_provisioning_profile(profile)
self.progress.completedUnitCount += 1
installedApp.isActive = false
self.finish(.success(installedApp))
break
} catch {
attempts -= 1
if (attempts <= 0){
self.finish(.failure(error))
}
}
do {
try remove_provisioning_profile(profile)
self.progress.completedUnitCount += 1
installedApp.isActive = false
self.finish(.success(installedApp))
break
} catch {
self.finish(.failure(error))
}
}
}