mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 23:03:27 +01:00
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:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user