Where can I find the sqlite3 database file in my mac?

I created a sqlite3 database using a terminal that has static data. I need to add this db file to my xcode project to extract data from it. But I could not find the db file in my mac to add to my project. Where can I find my db file to add it to my Xcode. Thanks in advance:)

+4
source share
4 answers

My sqlite database is here: Library / Application Support / iPhone Simulator / skd version (i.e. 5.1) / Applications / a bunch of numbers and letters / Documents / yourdatabase

+5
source
  • → Go to the desktop (for example, click on the desktop)
  • → press (shift) + (cmd) + (G) the search tab should open
  • -> on the search tab, enter this url "~ / Library / Developer / CoreSimulator / Devices /"

  • -> find the last device by the date changed and go further in the file explorer in / data / Containers / Data / Application / (APPLICATION_ID) / Documents / (databaseName) .sqlite

+2
source

Perhaps you can look at this topic, but I'm not sure if this is what you need: here

0
source

Finding the default directory path:

Open a terminal.

Open your database through the command line, then enter ".databases", the command displays the path to the database file right next to the "main" one.

In my case, the sequence of commands was:

sqlite3 myDBFile.sqlite

sqlite3> .databases

Output: 0 main / Users / Me / myDBFile.sqlite

-1
source

Source: https://habr.com/ru/post/1403816/


All Articles