The project in the Core Data Tutorial for iOS.
main.m
LocationsAppDelegate
RootViewController
Event
Locations.xcdatamodel
Add the following statement to the
application:didFinishLaunchingWithOptions:
method of the
application delegate.
NSLog(@"%@", [self applicationDocumentsDirectory]);
[Session started at 2011-05-06 13:53:34 -0400.] 2011-05-06 13:53:36.208 Locations[69133:207] /Users/myname/Library/Application Support/iPhone Simulator/4.1/Applications/7432C96A-09CC-4585-A2C7-C6D457110488/Documents
Type the following commands into a Terminal window on your Mac. The single quotes are needed because the pathname has a blank.
cd '/Users/myname/Library/Application Support/iPhone Simulator/4.1/Applications/7432C96A-09CC-4585-A2C7-C6D457110488/Documents' pwd
ls -l -rw-r--r-- 1 myname staff 20480 May 6 13:45 Locations.sqlite
sqlite3 Locations.sqlite .dump BEGIN TRANSACTION; CREATE TABLE ZEVENT ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZLONGITUDE FLOAT, ZLATITUDE FLOAT, ZCREATIONDATE TIMESTAMP ); INSERT INTO "ZEVENT" VALUES(11,1,1,-73.991460537937,40.7295659479561,326396716.2045); INSERT INTO "ZEVENT" VALUES(12,1,1,-73.991460537937,40.7295659479561,326396717.092048); CREATE TABLE Z_PRIMARYKEY (Z_ENT INTEGER PRIMARY KEY, Z_NAME VARCHAR, Z_SUPER INTEGER, Z_MAX INTEGER); INSERT INTO "Z_PRIMARYKEY" VALUES(1,'Event',0,13); CREATE TABLE Z_METADATA (Z_VERSION INTEGER PRIMARY KEY, Z_UUID VARCHAR(255), Z_PLIST BLOB); INSERT INTO "Z_METADATA" VALUES(1,'4FAE096B-41AF-47B0-902D-54A476687DB8',X'62706C6973743030D60102030405060708090C0D0E5F101E4E5353746F72654D6F64656C56657273696F6E4964656E746966696572735F101D4E5350657273697374656E63654672616D65776F726B56657273696F6E5F10194E5353746F72654D6F64656C56657273696F6E4861736865735B4E5353746F7265547970655F10204E5353746F72654D6F64656C56657273696F6E48617368657356657273696F6E5F10125F4E534175746F56616375756D4C6576656CA0110140D10A0B554576656E744F1020B149C3FA1711A8FE24DAB332BAF5C924858E8E303574FF646A68778551C70A525653514C6974651003513208153656727EA1B6B7BABDC3E6EDEF0000000000000101000000000000000F000000000000000000000000000000F1'); COMMIT;