fix store url for dev build
This commit is contained in:
@@ -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!
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user