This app replaces a USB GPS receiver.
NMEALink reads GPS and accelerometer from your iPhone/iPad, and forwards NMEA frames ($GPRMC and $GPHDT) to a navigation software (OpenCPN ...) running in your MacBook, using IP/UDP over Bluetooth, Wifi or USB. You just have to configure the Connexion Sharing between your Mac and your iPhone.
For information, IP addresses commonly seen between an iPhone and a MacBook (OSX Maverick) are :
For Bluetooth : 220.127.116.11
For USB : 18.104.22.168
For Wifi : 22.214.171.124
Tip : to know the Mac IP address, type 'ifconfig' in your MacBook shell.