I can't speak to Xcode details, but I can tell you the code depends on the gcc compiler being run with "-DUSB_MIDI". The default is "-DUSB_SERIAL", so if you can find a setting with Xcode for "-DUSB_SERIAL", change it to "-DUSB_MIDI". Or you could change it to "-DUSB_MIDI_SERIAL" to get both MIDI and USB Serial, which can be really helpful for troubleshooting if Xcode doesn't have a way to receive Serial.print() in just MIDI mode (as Arduino+Teensyduino can).