(Fix) autofill / extensions and restore persistent storage location (#686)

This commit is contained in:
Allan Feldman 2025-02-26 23:40:07 -05:00 committed by GitHub
parent 4ceed65182
commit cb8305f014
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 3 deletions

View file

@ -23,7 +23,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
lazy var passcodeLockPresenter = PasscodeLockPresenter(mainWindow: self.window)
func application(_: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
PersistenceController.shared.setup()
// Override point for customization after application launch.
SVProgressHUD.setMinimumSize(CGSize(width: 150, height: 100))
passcodeLockPresenter.present(windowLevel: UIApplication.shared.windows.last?.windowLevel.rawValue)

View file

@ -25,10 +25,13 @@ public class PersistenceController {
description?.shouldInferMappingModelAutomatically = false
if isUnitTest {
description?.url = URL(fileURLWithPath: "/dev/null")
} else {
description?.url = URL(fileURLWithPath: Globals.dbPath)
}
setup()
}
public func setup() {
func setup() {
container.loadPersistentStores { _, error in
if error != nil {
self.reinitializePersistentStore()

View file

@ -21,7 +21,6 @@ class CoreDataTestCase: XCTestCase {
try super.setUpWithError()
controller = PersistenceController(isUnitTest: true)
controller.setup()
}
override func tearDown() {