After installing Raspbian on your new Micro SD Card.
Connect the SDCard to your laptop using a adpater MicroSD to SD Adapter or using an MicroSD to USB adapter.
Under the terminal on your MacOSX, go to the boot mount point
cd /Volume/boot vi wpa_supplicant.conf
After add in the new file
country=FR
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
scan_ssid=1
ssid="YourSSID" psk="yourkey" key_mgmt=WPA-PSK }
If you need ssh (sure you need) in the same directory
/Volume/boot/# touch ssh
Sources: https://www.raspberrypi.org/documentation/configuration/wireless/headless.md