Search iPhone Text Messages with SQLite SQL Query

While you're here, check out some of our interactive visualizations:

Would you like to visualize your text messages?


-------------------------------------------------------------------------------



In my experience, the iPhone text message search functionality is usually pretty awful. Especially if you're trying to find a text from a few years ago. Luckily, if you backup your iPhone using iTunes, your text messages are exported/stored in a SQLite database, and it is fairly easy to query.

Here are the steps to SQL Query your Text Messages.

  1. Backup your iPhone using iTunes.

  2. Find the SQLite file that contains your text messages.
    - in ~/Library/Application Support/MobileSync/Backup/* with a filename of 3d0d7e5fb2ce288813306e4d4636395e047a3d28

  3. Ensure you have a SQLite Query tool (SQLiteBrowser is pretty good).

  4. Open your SQLite Text Message DB File using your favorite SQLite query tool.

  5. Execute this query to see all your messages.

Disclaimer, I had to guess at the table structure, therefore I can not confirm that the joins in this query are 100% correct. My quick spot checks seemed to check out, and I was able to query the message.text field to find old messages that the iPhone app was not able to.




Hope this helps,
Aaron



Comments

Popular posts from this blog

How to Turn Off Microsoft Arc Touch Mouse Scroll Sound Vibration

Configure SonarAnalyzer.CSharp with .editorconfig, no need for SonarCloud or SonarQube