Downloading iPhone app data with the organizer

Filed under the category of how did I not know about this before now…

Sometimes when you are debugging an iPhone app it is useful to be able to take a peek at the files actually created and stored on the device. Unfortunately there is no way to mount the sandboxed application filesystem from your Mac (at least not without jailbreaking).

Whilst playing around with some provisioning profiles yesterday I did stumble on way to do this from the Xcode Organizer window. I am sure this is documented somewhere by Apple and that I just missed it or forgot about it but just in case somebody else has also missed this:

With your device attached, find your app in the application window and expand the entry. Below the application name it shows an icon for the Application Data and on the right hand side is another small icon to download the data from the device. Since a picture is worth a thousand words:

Xcode organizer

The downloaded data includes the applications Documents, Library and tmp directories. Of course it only works for applications that you have deployed to the device.