Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any way to get your SQLite DB off iPhone?

Tags:

iphone

I'd like to analyze the data that I have in my iPhone app after doing some tests, and the data is in a SQLite database. Is there any way for me to be able to copy it off of the iPhone back to my laptop? I'm not aware of any mechanisms that allows me filesystem style access.

like image 853
Driss Zouak Avatar asked Mar 24 '11 19:03

Driss Zouak


People also ask

How do I access SQLite database on Iphone?

Step 1 − Open Xcode -→ Single View Application -→ Let's name is DBSqlite. Step 2 − Let's develop our UI, Open Main. storyboard and add one text field and two buttons as shown below. Step 3 − Create @IBAction for both the buttons and @IBOutlet for text field and name them btnInsert, btnShowData and name respectively.

Where is SQLite database stored iOS?

-Navigate to /Users/jk/Library/Developer/CoreSimulator/Devices/ and select the simulator file that matches the ID you found. -In the finder search, search for The current Model Version name.

Where is the SQLite database stored in mobile?

The Android SDK provides dedicated APIs that allow developers to use SQLite databases in their applications. The SQLite files are generally stored on the internal storage under /data/data/<packageName>/databases.

How do I disconnect a SQLite database?

Syntax. Following is the basic syntax of SQLite DETACH DATABASE 'Alias-Name' statement. DETACH DATABASE 'Alias-Name'; Here, 'Alias-Name' is the same alias, which you had used while attaching the database using ATTACH statement.


2 Answers

You don't need to turn on file sharing in the app to get this, you can get the data for any app you've built via Xcode's devices window.

In recent versions of Xcode (8 and up, I think), open this with Window menu --> Devices. Find the device in the device list and look at the installed apps list for the device. Each app that you've built and installed on the device will be listed (and maybe some others). Select your app and click the gear menu below the list. Clicking the "Download" item on the pop-up menu will enable you to copy the app's documents, library, and other directories to your Mac.

NB: This will download an .xcappdata file. Right-clicking on that and selecting "Show Package Contents" will allow you to drill down to the actual sqlite file.

like image 113
Tom Harrington Avatar answered Sep 25 '22 02:09

Tom Harrington


In Xcode 6 this is available at:

Window -> Devices -> -> Installed Apps.

Select your application.

Click the gear icon -> "Download Container"

like image 37
diadyne Avatar answered Sep 22 '22 02:09

diadyne