I wish to call the function persistentStoreCoordinator.destroyPersistentStoreAtURL(...)
. I'm creating my container with it like this NSPersistentContainer(name: "MyProject")
what I would like to know is how to get the URL of the persistentStore for use in the first call, in Swift preferably.
Many thanks.
The NSPersistentContainer
has a persistentStoreDescriptions
property.
That array describes the stores loaded in the coordinator, including their URL.
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