Limits quitting other AltStore processes to database migrations only

Previously, AltStore would quit all other processes when first accessing the database no matter what. However, this unintentionally caused the widget extension to quit the main app after refreshing apps.

Now, we only quit other AltStore processes if a database migration is required. This still prevents multiple AltStores with different database schemas from accessing database concurrently, but also allows extensions to access database without quitting main app.
This commit is contained in:
Riley Testut
2022-11-07 15:26:04 -06:00
committed by Magesh K
parent 3086492cbc
commit f294f1045a

View File

@@ -53,7 +53,6 @@ public class DatabaseManager
private let coordinatorQueue = OperationQueue()
private var ignoreWillMigrateDatabaseNotification = false
private init()
{
self.persistentContainer = PersistentContainer(name: "AltStore", bundle: Bundle(for: DatabaseManager.self))
@@ -93,7 +92,6 @@ public extension DatabaseManager
self.ignoreWillMigrateDatabaseNotification = true
CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), .willMigrateDatabase, nil, nil, true)
}
self.migrateDatabaseToAppGroupIfNeeded { (result) in
switch result
{