File tree Expand file tree Collapse file tree 4 files changed +21
-44
lines changed
Expand file tree Collapse file tree 4 files changed +21
-44
lines changed Original file line number Diff line number Diff line change @@ -39,21 +39,14 @@ final class DeactivateAppOperation: ResultOperation<InstalledApp>
3939 let allIdentifiers = [ installedApp. resignedBundleIdentifier] + appExtensionProfiles
4040
4141 for profile in allIdentifiers {
42- var attempts = 5
43- while ( attempts > 0 ) {
44- print ( " Remove Provisioning profile attempts left: \( attempts) " )
45- do {
46- try remove_provisioning_profile ( profile)
47- self . progress. completedUnitCount += 1
48- installedApp. isActive = false
49- self . finish ( . success( installedApp) )
50- break
51- } catch {
52- attempts -= 1
53- if ( attempts <= 0 ) {
54- self . finish ( . failure( error) )
55- }
56- }
42+ do {
43+ try remove_provisioning_profile ( profile)
44+ self . progress. completedUnitCount += 1
45+ installedApp. isActive = false
46+ self . finish ( . success( installedApp) )
47+ break
48+ } catch {
49+ self . finish ( . failure( error) )
5750 }
5851 }
5952 }
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ final class EnableJITOperation<Context: EnableJITContext>: ResultOperation<Void>
5050 do {
5151 try debug_app ( installedApp. resignedBundleIdentifier)
5252 self . finish ( . success( ( ) ) )
53- break
53+ retries = 0
5454 } catch {
5555 retries -= 1
5656 if ( retries <= 0 ) {
Original file line number Diff line number Diff line change @@ -41,19 +41,11 @@ final class RefreshAppOperation: ResultOperation<InstalledApp>
4141 guard let app = self . context. app else { return self . finish ( . failure( OperationError . appNotFound) ) }
4242
4343 for p in profiles {
44- var attempts = 5
45- while ( attempts > 0 ) {
46- print ( " Install provisioning profile attempts left: \( attempts) " )
47- do {
48- let bytes = p. value. data. toRustByteSlice ( )
49- try install_provisioning_profile ( bytes. forRust ( ) )
50- break
51- } catch {
52- attempts -= 1
53- if ( attempts <= 0 ) {
54- self . finish ( . failure( MinimuxerError . ProfileInstall) )
55- }
56- }
44+ do {
45+ let bytes = p. value. data. toRustByteSlice ( )
46+ try install_provisioning_profile ( bytes. forRust ( ) )
47+ } catch {
48+ self . finish ( . failure( MinimuxerError . ProfileInstall) )
5749 }
5850
5951 DatabaseManager . shared. persistentContainer. performBackgroundTask { ( context) in
Original file line number Diff line number Diff line change @@ -45,21 +45,13 @@ final class SendAppOperation: ResultOperation<()>
4545 print ( " AFC App `fileURL`: \( fileURL. absoluteString) " )
4646
4747 if let data = NSData ( contentsOf: fileURL) {
48- var attempts = 10
49- while ( attempts != 0 ) {
50- print ( " Send app attempts left: \( attempts) " )
51- do {
52- let bytes = Data ( data) . toRustByteSlice ( )
53- try yeet_app_afc ( app. bundleIdentifier, bytes. forRust ( ) )
54- self . progress. completedUnitCount += 1
55- self . finish ( . success( ( ) ) )
56- break
57- } catch {
58- attempts -= 1
59- if ( attempts <= 0 ) {
60- self . finish ( . failure( MinimuxerError . RwAfc) )
61- }
62- }
48+ do {
49+ let bytes = Data ( data) . toRustByteSlice ( )
50+ try yeet_app_afc ( app. bundleIdentifier, bytes. forRust ( ) )
51+ self . progress. completedUnitCount += 1
52+ self . finish ( . success( ( ) ) )
53+ } catch {
54+ self . finish ( . failure( MinimuxerError . RwAfc) )
6355 self . progress. completedUnitCount += 1
6456 self . finish ( . success( ( ) ) )
6557 }
You can’t perform that action at this time.
0 commit comments