如何查看Core Data中的现有数据? [英] How to view existing data in Core Data?
问题描述
好吧,可能这个问题是愚蠢的,但我找不到一种方式(程序化除外)。
我创建了一个使用Core Data的项目(适用于iPhone OS 3.0)。
xcdatamodel 文件显示了模式描述,但我想以表格形式查看数据(如 mssql server 的 management studio > )。
Well, may be this question is silly, but I couldn't find a way (except programmatically). I built a project (for iPhone OS 3.0) which uses Core Data. The xcdatamodel file shows the schema description, but I want to see the data in tabular form (like the management studio for mssql server or phpmyadmin for mysql).
有没有办法(除了编码)?这是什么?
Is there any way (except coding)? What is that?
此外,哪些文件(在磁盘/设备中)存储这些数据?
Also, which file (in disk/device) those data are stored into?
[我在Core Data上建立了教程(从苹果开始),命名为位置。他们在代码中使用这行代码:
NSURL * storeUrl = [NSURL fileURLWithPath:[[self applicationDocumentsDirectory] stringByAppendingPathComponent:@Locations.sqlite]];
[ I built the tutorial (from apple) on Core Data, named Locations. They used this line somewhere in the code:
NSURL *storeUrl = [NSURL fileURLWithPath: [[self applicationDocumentsDirectory] stringByAppendingPathComponent: @"Locations.sqlite"]];
但是,我没有在项目位置(也不在磁盘中)看到任何xxxxx.sqlite文件。]
But, I did not see any "xxxxx.sqlite" file in project location (nor in the disk).]
推荐答案
要查看coredata sql文件,可以使用任何标准的 sqlite
接口。您可以从命令行使用 sqlite3
,或使用类似 Sqlite Browser 。
To view the coredata sql file, you can use any standard sqlite
interface. You can use sqlite3
from command line, or use something like Sqlite Browser.
如果您想要Core Data的特定功能,可以使用 Core Data Browser 。
If you want something specific to Core Data, you can use Core Data Browser.
这篇关于如何查看Core Data中的现有数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!