How can I transfer iMessage/SMS messages from Mac to iPhone? I have a huge problem. I’ve restored my iPhone without first making a backup. I have all my iMessage/SMS conversations on my Mac (macOS Sierra).

Is there a way I can transfer those conversations to my iPhone?
Starting with iOS 11.4 and macOS 10.13.5 High Sierra, Messages in iCloud lets your messages sync across devices over iCloud.

On iOS, you enable this feature by toggling Messages under Settings → General → [Your Name] → iCloud.

On macOS, open the Messages app, then go to Messages → Preferences… → Accounts → iMessage and check Enable Messages in iCloud.

This feature will upload all the messages from each of your devices to iCloud, and merge them with messages uploaded from other devices.

From there, each device will only keep a cached copy of recent conversations, and download additional messages from iCloud whenever you try to view them. Once the merge/sync is complete, if you delete a message in one location, it will be deleted from all your devices.

Note that both iMessages and SMS/MMS are included as part of Messages in iCloud.

As a bonus, just like iCloud Photo Library, your messages will no longer be backed up as part of your daily iCloud Backup. This should save you storage in iCloud by no longer requiring duplicate backups of your messages for each of your iOS devices.