Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download app data in Xcode 4.2

Tags:

xcode

ios

iphone

In the latest version of Xcode I could simply go to Organizer->MyDevice->Applications and then select the app I wanted to look at and download the appdata in form of a folder with all the app content. Now I only get a .xcappdata file.

How can I access this file for take a look in a .sqlite file?

like image 644
Jones123 Avatar asked Oct 17 '11 16:10

Jones123


2 Answers

Under the Data files in Sandbox pane in the Organizer, you'll find all the individual files that the selected app stores on the device and uses, displayed in a hierarchical view.

For my app, it looks like this:

To view the files in Finder, download the .xcappdata file, go to where you save it in Finder, Control-click on it and choose Show Package Contents. The directory structure is identical to what you see in the Organizer, and you can open and/or copy out the files as usual.

like image 102
BoltClock Avatar answered Oct 19 '22 12:10

BoltClock


I'm constantly checking my app's database, so to speed things up I always download the .xcappdata to the same folder. I then run the following script that's sitting in that folder to look at the latest version of the database in 'sqliteman' (a sqlite program available through MacPorts):

#!/bin/bash
shopt - nullglob
for PACKAGE in *.xcappdata; do
    CURRENT=$PACKAGE
done
sqliteman "$CURRENT/AppData/Documents/yourapphere.sqlite"
like image 29
Dean Avatar answered Oct 19 '22 11:10

Dean