How do I access SQLite database instance on iPhone?

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.


Instructions for Xcode 6.0.1

  1. Xcode > Open > YourProject
  2. Xcode > Product > Run
  3. Xcode > Window > Devices
  4. (Column 1 - select) Devices > YourDeviceName
  5. (Column 2 - select) Installed Apps > YourAppName
  6. (Column 2 - select) Cog under 'Installed Apps' list
  7. (Pop-Up - select) Download Container...
  8. Save to location
  9. Right click on 'YourAppName.xcappdata'
  10. Select 'Show Package Contents'
  11. AppData > Documents > YourDatabase.sqlite

enter image description here


Exactly in the same way you do on the simulator. There are very few (important) differences between the device and simulator, and file access and library loading are for the most part not part of them.


In XCode 4, you do the same as Lounges suggested, which will save the whole file structure for your app to your destination of choice. Rename the .xcappdata file which is saved to .sqlite so you can open it by double clicking, then you can find the file from the device.

Tags:

Sqlite

Ios

Iphone