diff --git a/Package.swift b/Package.swift index e57b0998d454cb19ffe5ce24cf35db0088fd4356..13d77d0cdcb292bbf638c7199669102de4b74d2b 100644 --- a/Package.swift +++ b/Package.swift @@ -66,7 +66,7 @@ let package = Package( .package(url: "https://github.com/pointfreeco/combine-schedulers", from: "0.5.0"), .package(url: "https://github.com/kishikawakatsumi/KeychainAccess", from: "4.2.1"), .package(url: "https://github.com/google/google-api-objectivec-client-for-rest", from: "1.6.0"), - .package(url: "https://git.xx.network/elixxir/client-ios-db.git", .upToNextMajor(from: "1.0.1")), + .package(url: "https://git.xx.network/elixxir/client-ios-db.git", .upToNextMajor(from: "1.0.2")), .package(url: "https://github.com/firebase/firebase-ios-sdk.git", .upToNextMajor(from: "8.10.0")), .package(url: "https://github.com/pointfreeco/swift-composable-architecture.git",.upToNextMajor(from: "0.32.0")) ], diff --git a/Sources/PushFeature/PushHandler.swift b/Sources/PushFeature/PushHandler.swift index adb0feb4d96a9908ad9cc1990dd0d4f4c6af76e4..f750c575899229ba5f6212261197087755dc8442 100644 --- a/Sources/PushFeature/PushHandler.swift +++ b/Sources/PushFeature/PushHandler.swift @@ -103,9 +103,14 @@ public final class PushHandler: PushHandling { return } + let dbPath = FileManager.default + .containerURL(forSecurityApplicationGroupIdentifier: "group.elixxir.messenger")! + .appendingPathComponent("xxm_database") + .appendingPathExtension("sqlite").path + let tuples: [(String, Push)] = pushes.compactMap { guard let userId = $0.source, - let dbManager = try? Database.inMemory(), + let dbManager = try? Database.onDisk(path: dbPath), let contact = try? dbManager.fetchContacts(.init(id: [userId])).first else { return ($0.type.unknownSenderContent!, $0) } diff --git a/client-ios.xcworkspace/xcshareddata/swiftpm/Package.resolved b/client-ios.xcworkspace/xcshareddata/swiftpm/Package.resolved index ac651bcc41eec7a910637240b4f8f091c6578011..f47e17c7484d962629595cf21dc4f771c2e78cda 100644 --- a/client-ios.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/client-ios.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -50,8 +50,8 @@ "kind" : "remoteSourceControl", "location" : "https://git.xx.network/elixxir/client-ios-db.git", "state" : { - "revision" : "8674619071b9e2aa909b0626b0b37e64129c4841", - "version" : "1.0.1" + "revision" : "0fde5504ee087c13c5181b205869ea7dbffed900", + "version" : "1.0.2" } }, {