17

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?

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
Jones123
  • 249
  • 3
  • 8

2 Answers2

28

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.

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
  • 1
    In Organizer, I have "Devices" selected. Then I click on my device "Jays iPhone". Underneath it, I have Provisioning Profiles, Applications, Console, Device Logs, and Screenshots. None of these, nor the device itself, show the "Data files in Sandbox" pane (http://screencast.com/t/pjiy6Rme). How do you get to display that? – Jay Imerman Oct 19 '11 at 13:15
  • @Jay Imerman: Hmmm it displays for me by default in Xcode 4.2. Even if you don't see it, you can always download the .xcappdata archive and look inside using Finder instead. – BoltClock Oct 19 '11 at 14:26
  • 6
    Since updating to XCode 4.4 the application download only gets the Cookies.binarycookies file, though I can see the entire application directory hierarchy in the Organizer window. Is there an additional option or something I need to put in a plist somewhere to get the rest? – Robert Diamond Jul 31 '12 at 20:14
  • 2
    It seems like Xcode 4.4 broke this download feature. Upgrading to Xcode 4.4.1 fixed it for me. – otto Aug 16 '12 at 15:08
  • Xcode 4.6.3 fails to copy the contents of the Documents directory? Anybody else have this same problem? – slf Jul 17 '13 at 15:21
  • i cant see my app in Xcodeapp list.it is in TestFlight now.so that apps will not show in xcode? – Neelam Prajapati Aug 23 '17 at 08:01
3

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"
Dean
  • 8,632
  • 6
  • 45
  • 61