Question: how to connect your iphone to a mac?
Answer: Be signed into the same iCloud account on all devices.
Have all devices connected to the same Wi-Fi network.
Turn on Bluetooth on both devices.
Turn on Handoff on both devices. ... 
On an iPhone, go to Settings > General > Handoff > move the Handoff slider to on/green.