|
@@ -1,8 +1,12 @@
|
|
|
import Foundation
|
|
|
class DatabaseHelper {
|
|
|
|
|
|
+ /// The application group identifier defines a group of apps or extensions that have access to a shared container.
|
|
|
+ /// The ID is created in the apple developer portal and can be changed there.
|
|
|
+ static let applicationGroupIdentifier = "group.eu.merlinux.group.chat.delta.ios"
|
|
|
+
|
|
|
var sharedDbFile: String {
|
|
|
- guard let fileContainer = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.eu.merlinux.group.chat.delta.ios") else {
|
|
|
+ guard let fileContainer = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: DatabaseHelper.applicationGroupIdentifier) else {
|
|
|
return ""
|
|
|
}
|
|
|
let storeURL = fileContainer.appendingPathComponent("messenger.db")
|
|
@@ -14,7 +18,7 @@ class DatabaseHelper {
|
|
|
}
|
|
|
|
|
|
var sharedDbBlobsDir: String {
|
|
|
- guard let fileContainer = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.eu.merlinux.group.chat.delta.ios") else {
|
|
|
+ guard let fileContainer = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: DatabaseHelper.applicationGroupIdentifier) else {
|
|
|
return ""
|
|
|
}
|
|
|
return fileContainer.appendingPathComponent("messenger.db-blobs").path
|