Important things that you should check:a). Make sure that you are running iOS 8.1 or later for iPhone, OS X Yosemite or later for Mac.
b). Make sure that you are signed in to iCloud account on both your iOS device and Mac using the same Apple ID.
c). Connect your iPhone and Mac to the same Wi-Fi network.
d). Make sure there's an email address associated with your Messages App.
How to Send & Receive Text Messages on MacStep 1: Tap on the Messages app in your Mac to launch it.
Step 2: Pick up your iPhone, tap on Settings > Messages > Text Messages Forwarding.
Step 3: Select the Mac you want to send and receive messages to from the list of all your devices linked to the Apple ID.
Step 4: Once you select the Mac to ON, you will receive a popup on Mac that saying "To send and receive your iPhone text messages from (phone number) on this Mac, enter the code below on your iPhone now". At the same time, you'll be prompted to enter a code on the iPhone.
Step 5: Then enter the 6-digit code that is displayed on your Mac, and tap on Allow to complete the set up process.
After the Mac verifies your iPhone, you can both reply text messages from Mac and receive text on your Mac via the Messages app. If you want to transfer text messages from any iPhone to Mac, you can use iOS Transfer to make it.