I created a sqlite3 database using terminal which has a static data. I need to add that db file into my xcode project to retrive data from it. But, I couldnt find the db file in my mac to add into my project. Where can I find my db file, so that I can add it into my Xcode. Thanks in advance :)
我使用具有静态数据的终端创建了一个sqlite3数据库。我需要将该db文件添加到我的xcode项目中以从中检索数据。但是,我无法在我的mac中找到db文件添加到我的项目中。我在哪里可以找到我的db文件,以便我可以将它添加到我的Xcode中。提前致谢 :)
4 个解决方案
#1
5
My sqlite database is located here: Library/Application Support/iPhone Simulator/skd version(i.e. 5.1)/Applications/a bunch of numbers and letters/Documents/yourdatabase
我的sqlite数据库位于:Library / Application Support / iPhone Simulator / skd版本(即5.1)/ Applications /一堆数字和字母/ Documents / yourdatabase
#2
2
- ->Go to your Desktop(i.e click on the desktop)
- ->press (shift)+(cmd)+(G) a search tab should open up
-
->in the search tab enter this url "~/Library/Developer/CoreSimulator/Devices/"
- >在搜索选项卡中输入此URL“〜/ Library / Developer / CoreSimulator / Devices /”
-
-> find the latest device by the date modified and go further in the file explorer to /data/Containers/Data/Application/(APPLICATION_ID)/Documents/(databaseName).sqlite
- >按修改日期查找最新设备,并在文件资源管理器中进一步查看/data/Containers/Data/Application/(APPLICATION_ID)/Documents/(databaseName).sqlite
- >转到桌面(即点击桌面)
- >按(shift)+(cmd)+(G)搜索选项卡应该打开
#3
0
Maybe you could look at this thread, but I'm not sure that is what you want : here
也许你可以看一下这个帖子,但我不确定那是你想要的:这里
#4
-1
Finding the default directory path:
查找默认目录路径:
Open terminal.
Open your database trough the command line then type '.databases', the command outputs the path of your database file right next to 'main'.
通过命令行打开数据库,然后键入“.databases”,该命令将输出“main”旁边的数据库文件的路径。
In my case the command sequence was:
在我的例子中,命令序列是:
sqlite3 myDBFile.sqlite
sqlite3> .databases
Output: 0 main /Users/Me/myDBFile.sqlite
输出:0 main /Users/Me/myDBFile.sqlite
#1
5
My sqlite database is located here: Library/Application Support/iPhone Simulator/skd version(i.e. 5.1)/Applications/a bunch of numbers and letters/Documents/yourdatabase
我的sqlite数据库位于:Library / Application Support / iPhone Simulator / skd版本(即5.1)/ Applications /一堆数字和字母/ Documents / yourdatabase
#2
2
- ->Go to your Desktop(i.e click on the desktop)
- ->press (shift)+(cmd)+(G) a search tab should open up
-
->in the search tab enter this url "~/Library/Developer/CoreSimulator/Devices/"
- >在搜索选项卡中输入此URL“〜/ Library / Developer / CoreSimulator / Devices /”
-
-> find the latest device by the date modified and go further in the file explorer to /data/Containers/Data/Application/(APPLICATION_ID)/Documents/(databaseName).sqlite
- >按修改日期查找最新设备,并在文件资源管理器中进一步查看/data/Containers/Data/Application/(APPLICATION_ID)/Documents/(databaseName).sqlite
- >转到桌面(即点击桌面)
- >按(shift)+(cmd)+(G)搜索选项卡应该打开
#3
0
Maybe you could look at this thread, but I'm not sure that is what you want : here
也许你可以看一下这个帖子,但我不确定那是你想要的:这里
#4
-1
Finding the default directory path:
查找默认目录路径:
Open terminal.
Open your database trough the command line then type '.databases', the command outputs the path of your database file right next to 'main'.
通过命令行打开数据库,然后键入“.databases”,该命令将输出“main”旁边的数据库文件的路径。
In my case the command sequence was:
在我的例子中,命令序列是:
sqlite3 myDBFile.sqlite
sqlite3> .databases
Output: 0 main /Users/Me/myDBFile.sqlite
输出:0 main /Users/Me/myDBFile.sqlite