Starting with OS X Yosemite, there is a useful feature on Mac called SMS Continuity (Message Forwarding), which allows you to receive (forward) SMS messages from iPhone to Mac.
The essence of the function is the ability to forward SMS messages from iPhone to Mac and vice versa. You can use Forward Messages only between an iPhone with iOS 8.1.x (or later) and a Mac with OS X Yosemite (or later).
♥ BY THEME: How to teach iPhone to pronounce the name of the person calling you.
How to receive SMS from iPhone to iMac, MacBook Pro, MacBook Air, etc.
1. Open the Settings app on iPhone and follow the path Messages → Forwarding…
2. Select from the list of devices to which you want to send SMS and iMessage messages.
3. Activate the iMessage service (if it is turned off) according to this instruction (on iPad: Settings → Posts; on macOS: app Posts → Settings).
4. If there is a need to synchronize the entire history of text messages on selected devices, enable the service Posts in iCloud settings.
On iPhone and iPad: Settings → Your name → iCloud → Messages.
On Mac: Messages app → Settings → iMessage tab → Enable Messages in iCloud…
After completing these steps, all text message history available in iCloud will be available on all devices