I'm thinking about recovering the data on my bricked iPhone, but the hard drive recovery company would probably need to know what file types I want to recover. Most applications store their data in SQLite databases. When I sync to my computer, it saves this in a .mddata file. I'm guessing this file type is only used for the backup process.

What file type/extension is used to store the data on the iPhone?

I realize that apps can probably store it in whatever format they want. I want to know what's the default (or most likely) format for those that store their data in SQLite files.


I'm not sure if you want to know about storage on the iPhone itself, or storage by iTunes in the backups, so I'll take a stab at both. :)

See here for a more in-depth analysis, but the basic gist is that the .mddata files are typically SQLite databases (occasionally encrypted), while the corresponding .mdinfo files are the metadata associated with them. (Older versions of iTunes used .mdbackup files.)

Here's a more practical description of retrieving data from an existing iPhone/iPod backup, and another one which does so with the more recent format. Also, there's this presentation that dives into the format a bit. Here's a blog entry about deciphering the obfuscated filenames, and finally, here's a StackOverflow discussion about decrypting the encrypted .mddata files (which didn't end in a resolution of any kind).

On the iPhone itself, many applications store their data in a SQLite database directly because of the simplicity of doing so. Also, the Core Data ORM uses it under the hood, although that's really just an implementation detail.

But, as you've noted, there's no requirement to use SQLite; applications can store data in something as simple as a plain text file or XML document, or as complicated as a database of their own making.

  • I meant the phone itself, since when I give the hard drive recovery company my phone, they only have access to the phone. That's useful information though, so you should keep it. However, I'm wondering which file extension is used to store these SQLite databases on the phone? – Senseful Jul 23 '10 at 20:22
  • 1
    Taking a random browse through the filesystem on my iPhone, I see .sql, .sqlite, and .sqlite3 files; but note, however, that these filenames are all at the developers' discretion. I'm afraid I don't know what file extension is used for data stores based on Core Data. That being said, this isn't necessarily going to get you anything useful, because it's only part of what makes up a given application; I'm curious why you wouldn't simply have everything restored? – esm Jul 24 '10 at 19:05
  • @esm: The recovery company simply gives you a cd-rom with the files they were able to recover. They won't restore the phone since something is wrong with the OS. – Senseful Aug 2 '10 at 7:58

If an application uses Core Data with SQLite, the file extension will be .sqlite. As @esm pointed out, some apps also use .sql and .sqlite3.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .