fix store url for dev build

This commit is contained in:
Trey t
2022-02-28 23:12:13 -06:00
parent ab61434af9
commit d083c0ebdc

View File

@@ -102,11 +102,13 @@ extension NSManagedObjectContext {
class NSCustomPersistentContainer: NSPersistentContainer {
override open class func defaultDirectoryURL() -> URL {
#if DEBUG
var storeURLDebug = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: Constants.groupShareIdDebug)
storeURLDebug = storeURLDebug?.appendingPathComponent("Feels-Debug.sqlite")
return storeURLDebug!
#endif
var storeURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: Constants.groupShareId)
storeURL = storeURL?.appendingPathComponent("Feels.sqlite")
#if DEBUG
storeURL = storeURL?.appendingPathComponent("Feels-Debug.sqlite")
#endif
return storeURL!
}
}