mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-16 02:03:32 +01:00
Deactivates apps by backing up + deleting them on iOS 13.5+
Deactivating apps by removing their profiles no longer works on iOS 13.5. Instead, AltStore will now back up the app by temporarily replacing it with AltBackup, then remove the app from the phone.
This commit is contained in:
@@ -21,6 +21,10 @@ class RefreshGroup: NSObject
|
||||
|
||||
private(set) var results = [String: Result<InstalledApp, Error>]()
|
||||
|
||||
// Keep strong references to managed object contexts
|
||||
// so they don't die out from under us.
|
||||
private(set) var _contexts = Set<NSManagedObjectContext>()
|
||||
|
||||
private var isFinished = false
|
||||
|
||||
private let dispatchGroup = DispatchGroup()
|
||||
@@ -33,6 +37,8 @@ class RefreshGroup: NSObject
|
||||
super.init()
|
||||
}
|
||||
|
||||
/// Used to keep track of which operations belong to this group.
|
||||
/// This does _not_ add them to any operation queue.
|
||||
func add(_ operations: [Foundation.Operation])
|
||||
{
|
||||
for operation in operations
|
||||
@@ -57,6 +63,14 @@ class RefreshGroup: NSObject
|
||||
func set(_ result: Result<InstalledApp, Error>, forAppWithBundleIdentifier bundleIdentifier: String)
|
||||
{
|
||||
self.results[bundleIdentifier] = result
|
||||
|
||||
switch result
|
||||
{
|
||||
case .failure: break
|
||||
case .success(let installedApp):
|
||||
guard let context = installedApp.managedObjectContext else { break }
|
||||
self._contexts.insert(context)
|
||||
}
|
||||
}
|
||||
|
||||
func cancel()
|
||||
|
||||
Reference in New Issue
Block a user