When using CoreData as the background data storage medium for the app, we would like to know if the data was successfully inserted. To do this, I want to find Coredata.sqlite's file.
The storage directory specified in the code is:
-(nsurl *) applicationdocumentsdirectory {
?
? ? return [[[Nsfilemanagerdefaultmanager] urlsfordirectory: Nsdocumentdirectoryindomains:nsuserdomainmask] lastobject];
}
So we would like to know whether there is really a file in this directory Coredata.sqlite, because after upgrading to XCode6 beta4, Apple modified the directory, IOS Simulator version also upgraded to 8.0, obviously the great user to the directory is not found:
User (current user)/library (Chinese: Resource library)/application Support/iphone simulator/
Under this directory I only found 6.1, user two folders, obviously not, then we can print the file address of the database in the program:
2014-08-13 19:40:00.199 sqlconnector[5876:863571] Store url:file:///users/admire/library/developer/coresimulator/ devices/d95c5e37-08c8-4929-8759-08bd284d9819/data/containers/data/application/ 9606a48c-0584-4bc4-a9a8-d8ac4f61cd0b/documents/datamodel.sqlite
Obviously this is the document we want to find;