Skip to content

Commit

Permalink
(Fix) autofill / extensions and restore persistent storage location (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
a-feld authored Feb 27, 2025
1 parent 4ceed65 commit cb8305f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion pass/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion passKit/Controllers/CoreDataStack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion passKitTests/CoreData/CoreDataTestCase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class CoreDataTestCase: XCTestCase {
try super.setUpWithError()

controller = PersistenceController(isUnitTest: true)
controller.setup()
}

override func tearDown() {
Expand Down

0 comments on commit cb8305f

Please sign in to comment.