Skip to content

Instantly share code, notes, and snippets.

@konarkmodi
Created November 6, 2016 13:50
Show Gist options
  • Save konarkmodi/75215ec7702dadf8feb5440422449ee5 to your computer and use it in GitHub Desktop.
Save konarkmodi/75215ec7702dadf8feb5440422449ee5 to your computer and use it in GitHub Desktop.
iMessages on Mac
sqlite3 ~/Library/Messages/chat.db 'select datetime(message.date + strftime("%s", "2001-01-01 00:00:00"), "unixepoch", "localtime") as "DATE", message.text as "Message", chat.chat_identifier as "Recipient", CASE(message.is_from_me) when 0 THEN "No" WHEN 1 THEN "Yes" END as "Me" from (select chat_id, message_id from chat_message_join) as 'master' INNER JOIN message ON message.ROWID = master.message_id INNER JOIN chat ON chat.ROWID = master.chat_id;';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment