查看SQLite3数据库(XCODE) [英] Viewing SQLite3 Database (XCODE)
问题描述
我在XCODE中创建了一个使用SQLite3数据库的iphone应用程序。如果它不存在,我将以编程方式创建数据库。我运行程序时没有收到任何错误。
I am creating an iphone app within XCODE the makes use of an SQLite3 database. I am creating the database programmatically if it does not exist. I am not getting any errors when I run the program.
如何检查数据库的内容以确保数据已正确插入正确的列? Xcode在哪里将表放在我可以查看的系统中?
How can I check the contents of the database to ensure that the data has been inserted correctly into the correct columns? Where does Xcode place the table within my system where I can view it?
推荐答案
将在您的应用程序中创建SQLite数据库 Documents
文件夹,在模拟器的基本目录中。
The SQLite database will be created in your apps Documents
folder, in the simulator's base directory.
在Xcode 6之前,你可以查看in:
~/Library/Application Support/iPhone Simulator/4.2/Applications/GUID/Documents
还有一个名为 SQLiteBrowser ,可用于浏览应用程序创建的数据库。
There is also a Mac OS X application called SQLiteBrowser that you can use to browse the database your app created.
从Xcode 6开始,新的iOS模拟器目录位于:
As of Xcode 6, the new iOS simulator's directory is located here :
〜/ Library / Developer / CoreSimulator
最终,你可以在这样的位置找到你的应用程序的数据库(用你的替换UID):
〜/ Library /开发商/ CoreSimulator /设备/ 4D2D 127A-7103-41B2-872B-2DB891B978A2 / data / Containers / Data / Application / 0323215C-2B91-47F7-BE81-EB24B4DA7339 / Documents / MyApp.sqlite
Ultimately, you can find your app's database under a location like this (Replace UIDs by yours) :
~/Library/Developer/CoreSimulator/Devices/4D2D127A-7103-41B2-872B-2DB891B978A2/data/Containers/Data/Application/0323215C-2B91-47F7-BE81-EB24B4DA7339/Documents/MyApp.sqlite
来源: SO:Xcode 6 iPhone模拟器应用程序支持位置
这篇关于查看SQLite3数据库(XCODE)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!