如何在iPhone上访问SQLite数据库实例? [英] How do I access SQLite database instance on iPhone?

查看:129
本文介绍了如何在iPhone上访问SQLite数据库实例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个使用内置SQLite数据库的iPhone应用程序。我正在尝试通过 sqlite3 命令行工具查看和打开数据库,这样我就可以对它执行任意SQL。

I'm developing an iPhone app that uses the built-in SQLite database. I'm trying to view and open the database via the sqlite3 command line tool so I can execute arbitrary SQL against it.

当我在模拟器中运行我的应用程序时,它创建的 .sqlite 文件位于〜/ Library / Application Support / iPhone Simulator /用户/应用程序/

When I run my app in the simulator, the .sqlite file it creates is located at ~/Library/Application Support/iPhone Simulator/User/Applications/.

如何在物理iPhone上查看该文件?

How can I see that file on the physical iPhone?

推荐答案

在Xcode中选择window-> organizer,然后展开手机应用程序部分中应用程序旁边的节点。选择应用程序数据旁边的黑色向下箭头,并将文件保存在桌面上的任何位置。你的sqlite数据库应该在某处。

In Xcode select window->organizer and expand the node next to your application in the applications section on your phone. Select the black downward pointing arrow next to application data and save the file anywhere on your desktop. Your sqlite database should be in there somewhere.

关于如何在完成后重新开始使用它我没有任何线索。

As for how to go about getting it back on the phone once your done i have no clue.

这篇关于如何在iPhone上访问SQLite数据库实例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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