Skip to content

Commit cb8305f

Browse files
authored
(Fix) autofill / extensions and restore persistent storage location (#686)
1 parent 4ceed65 commit cb8305f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

pass/AppDelegate.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2323
lazy var passcodeLockPresenter = PasscodeLockPresenter(mainWindow: self.window)
2424

2525
func application(_: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
26-
PersistenceController.shared.setup()
2726
// Override point for customization after application launch.
2827
SVProgressHUD.setMinimumSize(CGSize(width: 150, height: 100))
2928
passcodeLockPresenter.present(windowLevel: UIApplication.shared.windows.last?.windowLevel.rawValue)

passKit/Controllers/CoreDataStack.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@ public class PersistenceController {
2525
description?.shouldInferMappingModelAutomatically = false
2626
if isUnitTest {
2727
description?.url = URL(fileURLWithPath: "/dev/null")
28+
} else {
29+
description?.url = URL(fileURLWithPath: Globals.dbPath)
2830
}
31+
setup()
2932
}
3033

31-
public func setup() {
34+
func setup() {
3235
container.loadPersistentStores { _, error in
3336
if error != nil {
3437
self.reinitializePersistentStore()

passKitTests/CoreData/CoreDataTestCase.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class CoreDataTestCase: XCTestCase {
2121
try super.setUpWithError()
2222

2323
controller = PersistenceController(isUnitTest: true)
24-
controller.setup()
2524
}
2625

2726
override func tearDown() {

0 commit comments

Comments
 (0)