views:

39

answers:

2

I'm currently beta testing an application I'm working on. I've entered data into this app that I don't want to lose, however the current state of the app is that it will not even start (doesn't even generate crash log or connect to debugger).

I would be OK just deleting it and re-installing if I could get the data in the SQLite database out of it beforehand. Is there any way to do this?

+1  A: 

There are several iphone browsers out there to look into your phone. Or look in the iTunes backup, find the .mddata files and grep for anything which is unique to your sqlite file.

The .mddata will then just be the sqlite file, as long as you didn't encrypt your backup of course.

The sqlite file can be accessed using command line sqlite, which you can find for any platform.

edit: ps. if you saved your data in the Caches folder of your app, it will not be backed up, so you would have to revert to accessing files through the USB or Wifi. This may require jailbreaking.

mvds
+1  A: 

If the SQLite database is in your app's documents folder, you might be able to pluck it out using iTunes:

  1. Add the UIFileSharingEnabled key with value YES to your app's info.plist file.
  2. Copy this new version of your app to your iPhone using iTunes (rather than Xcode).
  3. Head to the Apps tab of your iPhone's sync settings and scroll down to "File Sharing".

You can now save a copy of the sqlite file (along with anything else in your app's document's folder).

Additionally, you can copy stuff to the iPhone this way too, which is nice for testing certain things.

Defragged