iOS messages to iMessage (Mac)

I have recently moved from an android phone to an iPhone 5. I have successfully moved all of my text messages from my android to the iPhone using the "Move to iOS" application from the Google play store.

I have made an iTunes backup of the messages, phones, etc. to my MacBook Pro. Using 3rd party software, I am able to see all of my messages that are on my iPhone via the backup on my Mac.

Does anyone know of anyway to have the conversations imported to the Mac's iMessage application? I know that the messages are found in ~/Library/Message/Archive/ directory with 3 database files found one level up from that. I have attempted to save SMS.db from the iPhone backup and rename it chat.db. However, it does not recreate the messages so I think there is more to the story than a simple renaming.

Thanks!


This is possible.

Move the sms.db and Attachments from your phone. They are located at /var/mobile/Library/SMS/ or you can extract them from a backup made by iTunes.

On your Mac, move the contents of ~/Library/Messages to a backup location.

Copy the sms.db and Attachments folder to ~/Library/Messages

Using an SQLite browser such as DB Browser open the sms.db file and execute the following to change location of attachments:

UPDATE attachment SET filename = replace(filename, '/Library/SMS/Attachments/', '/Library/Messages/Attachments/') WHERE filename LIKE '%/Library/SMS/Attachments/%';

Rename sms.db to chat.db

Then you should delete the folder ~/Library/containers/com.apple.iChat and restart. You are now done.

Source: https://denbeke.be/blog/mac/exporting-messages-and-attachments-from-iphone-to-mac/