views:

649

answers:

2

Hi all,

I am developing an iPhone app for uni and we create an sqlite database file within the iPhone's sandbox directory.

Our application writes internally to this file, I am wondering how it would be possible to get this file back to my desktop. I don't really mind how it can be done, any way is fine. Maybe it is possible to even do something like emailing it from the app (if that is possible). Just a suggestion if anyone knows a way.

Thanks in advance.

+1  A: 

Oh it looks like I figured it out myself.

If you create the data in the iPhone Simulator, you can access all files here:

~/Library/Application Support/iPhone Simulator/User/Applications/*randomstring*/Documents

The random string is quite long and so just use trial and error to see which directory contains your application files.

Brock Woolf
You can just sort by date in that folder and your most recent project will be at the top (at least it always is for me).
Rob
Of course, thanks for that Rob :)
Brock Woolf
+4  A: 

You can use the Organizer.

Connect your iPhone and choose Window->Organizer in Xcode.

Lots of options there, including what you're looking for. Specifically, click your iPhone under Devices, then in the Summary section find your app under Applications. Click the triangle next to your app which should reveal your Application Data with an arrow button to download it to your Mac.

Good luck!

Rob
Actually, I like your answer better +1 and Tick for you!
Brock Woolf