I am really struggling with this. I am trying to back up my active database. According to Apple, the best option is not to use the File Manager, but the migratePersistentStore method. However, I do not understand this. I have my PersistentStoreCoordinator in an AppDelegate app. So, if I move persistent storage, will my coordinator lose it after moving it correctly? So, now the store is now in a new place, but not in the old one? So, do you have any sample program code for this, how can my application still continue to work with the original copy?
Or can I just copy all the files using the filemanager with the same prefix, and not migrate ?! Much easier...
source
share