This isn't much information at all in the documentation.
https://developer.apple.com/reference/coredata/nspersistentstorecoordinator/1468907-removepersistentstore
https://developer.apple.com/reference/coredata/nspersistentstorecoordinator/1468888-destroypersistentstoreaturl
removePersistentStore:error:
removes the store from the persistent store coordinator. It's not available to use by the app, but the persistent store file is still there and could be re-added.destroyPersistentStoreAtURL:withType:options:error:
removes all traces of the persistent store file. You could use NSFileManager
methods, but you'd have to know some details about the persistent store file to wipe it out completely. Some are documented-- like the names of the journal file(s). Some are not documented-- like the location and names of external binary files. This method gets everything.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With