On your Mac:
On your iPhone/iPod touch:
The next step is to create and connect to a MIDI Network Session
Ad hoc networks between laptops and iOS devices can get 'drowned-out' by mobile phone signals in live venues. The bigger the crowd the bigger this problem becomes.
In this scenario it is better to use a MIDI cable (eg iRig MIDI) from your iOS device to the MIDI target, or set up a special wifi router that can isolate your signals from the crowd, and is connected to your laptop via ethernet.