Show HN: imessage-exporter, a CLI app and library
github.com
github.com
iMessage doesn't keep your whole message history on-device. You can scroll back and it will fetch a bit more each time, but that's it.
Is there anyway to pull back to the beginning of time into the local database? I'd like to retrieve some specific old messages from a friend who has passed away. If I could get them out I could search (I know what I am looking for) but it would involve an unfeasible amount of "pull to fetch more"
Unless you’ve changed the “message history” setting, yes, it does keep all history on-device. It’s just incredibly frustrating to access any of it because Messages.app is awful at history.
This is confidently incorrect.
The entire database is stored on device in a SQLite database. It absolutely has a terrible UI for fetching messages, but they’re all there.
If OP wants to find this file, a good search term is "3d0d7e5fb2ce288813306e4d4636395e047a3d28" which apparently is a sum of the string "HomeDomain-Library/SMS/sms.db".
One thing I miss from Android was the simplicity of getting data in and out of the phone. I could just dump everything to CSV and be done with it.
Messages seems to be somewhat random about keeping/removing attachments from your devices regardless of how much storage you have free or whether you have 'Optimise Storage' off.
*note this is specifically when using Messages with iCloud
They explicitly said what they don't want to do it.
one friend lost many of his baby pictures
another lost all text messages from his (deceased) parent
many family members just break a phone and move on.
it is heart-crushingly bad that apple doesn't allow easy access and export from their proprietary message database.
and no, I don't mean running sqlite3
Most of the time the complaint is that apple forces you to use icloud and back up everything.
$ sqlite3 ~/Library/Messages/chat.db
and then performing some sql commands
You can get this file from an unencrypted iOS backup: https://github.com/ReagentX/imessage-exporter/blob/c73bc4d66...
Instructions I found from Apple (https://support.apple.com/en-us/HT203977) are to use the Cloud, a Mac, or Windows +iTunes.
Something that runs in docker container on my home server. If my phone gets stolen, I have 1 hour old backup....