I am copying a file database with this code
try fileManager.copyItem(atPath: storeURL.path, toPath: storeCopyURL.path)
I can see that a new sqlite database is created
later, when I try to use this function
try! sharedInstance.managedObjectStore.addSQLitePersistentStore(atPath: storeURL.path, fromSeedDatabaseAtPath: storeCopyURL.path, withConfiguration: nil, options: nil)
I get an error
E restkit.core_data:RKManagedObjectStore.m:299 Failed to copy seed database from path ...
To securely copy a file you should use the following extension:
For anything else regarding CoreData we need more information about your code and what you are trying to do.