Where is an application's Core Data sqlite database file located?
I would like to write a method that deletes my application's Core Data store, which I would follow by creating a new sto开发者_开发技巧re. Is there a standard approach for doing this, and where is the database located in my application's sandbox?
You (perhaps unwittingly) have already told it where to go. In Apple's Template code, the ApplicationDelegate automatically creates this store in the Application's Documents folder. Take a look at the -(NSPersistentStoreCoordinator *) persistentStoreCoordinator
method in your ApplicationDelegate.
精彩评论