iPhone核心数据模拟器 [英] IPhone core data simulator

查看:70
本文介绍了iPhone核心数据模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个使用核心数据的应用程序.有没有办法在模拟器上查看sqlite数据库?也许可以在模拟器上查询sqlite db的工具?像数据浏览器一样?

I've created an app that uses core data. Is there a way to view the sqlite db on the simulator? A tool perhaps that allows to query the sqlite db on the simulator? Like a data browser?

有没有办法将iphone模拟器浏览到sqlite数据库位置?

Is there a way to browse the iphone simulator to the sqlite db location?

推荐答案

Xcode 5

我刚刚下载了 Base 的试用版,并能够将其指向.sql通过以下方式从模拟器中获取数据库:

Xcode 5

I just downloaded a trial of Base and was able to point it at the .sql database from the simulator via:

/Macintosh HD/用户/用户名"/库/应用程序支持/iPhone模拟器/当前iOS开发版本"/应用程序/

/Macintosh HD/Users/"username"/Library/Application Support/iPhone Simulator/"current iOS development version"/Applications/

应用程序的文件夹名称不可读,但是,如果单击该文件夹,您应该能够看到名称熟悉的内容.

The folder names for the applications are unreadable, but if you click on the folder you should be able to see the contents with familiar names.

这在Xcode 6中已更改,现在位于~/Library/Developer/CoreSimulator/Devices/<device-id>/data/Containers/Data/Appl‌​action,可在文档目录<app-id>/Documents/<name>.sqlite

This was changed in Xcode 6, and now is located at ~/Library/Developer/CoreSimulator/Devices/<device-id>/data/Containers/Data/Appl‌​action where the database itself can be found within the documents directory <app-id>/Documents/<name>.sqlite

这篇关于iPhone核心数据模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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