如何查看数据存储在Core Data中? [英] How view data stored in Core Data?

查看:353
本文介绍了如何查看数据存储在Core Data中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的应用程序创建一个Core Data模型。我想能够看看里面看看我在那里存储了什么。

I'm creating a Core Data model for my application. I would like to be able to look inside it to see what I have stored in there.

比搜索后端存储(我的应该是SQLite)更容易的方法吗?

Is there an easier way than searching for the backing store (mine should be SQLite) and reading it from there? Doesn't seem very Apple-esque.

推荐答案

一旦应用程序在模拟器中运行并创建了持久存储文件,可以在应用程序的Documents目录中找到该文件。

Once your app has run in the simulator and created the persistant store file, you can find the file in your app's Documents directory.

您的应用程序将位于文件夹内(〜是您的主目录):

〜应用程序支持/ iPhone模拟器/用户/应用程序/

Your app will be folder inside (~ is your home directory):
~/Library/Application Support/iPhone Simulator/User/Applications/

我按修改日期排序,找到我刚刚构建的应用程序。

I sort by "Date Modified" to find the app that I just built.

要查看SQLite文件,请查看 Base 和/或< a href =http://christian-kienle.de/CoreDataEditor/ =nofollow noreferrer> Core Data Editor 。

For viewing a SQLite file, check out Base and/or Core Data Editor.

这篇关于如何查看数据存储在Core Data中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆