Your iPhone and Mac must be on the same Wi-Fi network.
I'm running macOS High Sierra 10.13.3 on a late 2015 iMac retina 27-inch.
So this question was last posed in 2014 and the answer at that time was to check:
System Preferences>Security & Privacy >Firewall>Firewall Options>*DESELECT*Block all incoming connections
Tried that. Didn't work. Tried shutting off the firewall. Still no go. Any ideas?
MacBook Air, OS X Mavericks (10.9)