
Make sure your SQL client and/or terminal are selected. Open System Preferences, find the “Security & Privacy” pane, click on the “Privacy” tab, and find the “Full Disk Access” item. Let’s get that out of the way right away. Even so, it’s actually quite easy to get access to the database, as long as you don’t mind granting full disk access to some applications. I’m doing this on macOS Catalina, which has added some additional security features (i.e., restrictions). Similarly, if you try and open the database in a SQL client, you’ll likely see an error. If you open a terminal and run ls ~/Library/Messages/chat.db, you’ll get a message like: ls: Messages: Operation not permitted. The database is located at ~/Library/Messages/chat.db. However, your mileage may vary depending on whether you are using a SQL client (I use TablePlus) or sqlite3 on the command line.

There aren’t any prerequisites to getting started (other than a Mac with iMessage). With a little setup, you can use SQL’s raw power to look through your old messages.

If you use iMessage on your Mac, you can access the SQLite database where all of your messages are stored. iOS 13 helped with this quite a lot (while still leaving something to be desired), but searching on your computer is basically worthless.įortunately, there is a relatively easy fix for this. What frustrates me is the inability to efficiently search through old messages. I love being able to send messages from my computer, and the integration between the two devices is seamless. It’s also one of my least favorite things. IMessage is one of my favorite things about having an iPhone and a Mac.
