如何检查存储在我的核心数据数据库中的内容? [英] How can I check what is stored in my Core Data Database?
问题描述
我正在制作一个依赖于 Core Data 的应用程序.我可以在文本字段中输入数据并存储它.
I am making an app that relies on Core Data. I am able to enter data into a text field and store it.
但我需要知道数据是否正在存储.
But I need to know if the data is being stored.
我正在尝试为我的 tableView 创建一个 detailView,但没有得到任何结果.现在我想知道是因为我的代码做错了,还是数据没有正确存储.
I am trying to make a detailView to my tableView and I am not getting any results. Now I am wondering is that because I am doing something wrong with my code, or is the data nto being stored properly.
如何查看应用程序的 CoreData 数据库中存储的内容?
How can I see what is stored in the app's CoreData database?
推荐答案
如果您使用 sqlite
作为 Core Data
的存储介质,您可以在模拟器中运行您的应用并尝试检查位于沙箱库文件夹中的数据库文件.
If you use sqlite
as the storage media for Core Data
, you can run your app in simulator and try to check the database file which is located in the sandbox's Library folder.
路径应类似于:~/Library/Application Support/iPhone Simulator/5.1/Applications/3BF8A4B3-4959-4D8F-AC12-DB8EF4C3B6E1/Library/YourAppName.sqlite
要打开sqlite
文件,您需要一个工具.我使用名为 Liya 的免费工具(http://itunes.apple.com/us/app/liya/id455484422?mt=12).
To open the sqlite
file, you need a tool. I use a free tool called Liya (http://itunes.apple.com/us/app/liya/id455484422?mt=12).
这篇关于如何检查存储在我的核心数据数据库中的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!