如何检查核心数据数据库中存储的内容? [英] How can I check what is stored in my Core Data Database?
问题描述
我正在制作一个依赖核心数据的应用程序。我可以在文本字段中输入数据并将其存储。
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,但没有得到任何结果。现在我想知道的是,因为我的代码做错了什么,或者数据nto是否正确存储了?
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
用作以下存储介质: 核心数据
,您可以在模拟器中运行您的应用,并尝试检查位于沙箱库文件夹中的数据库文件。
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屋!