There are many ways to connect your device to MIDI instruments. Each of these connections are supported by CoreMIDI which is how Apple products communicate this digital information amongst themselves.
OnSong automatically connects to MIDI devices found in CoreMIDI. For instance, if you plug in a MIDI adapter into your device, it will automatically appear and be available to OnSong by default.
You can disable MIDI endpoints for both send and receive within OnSong. To do this, go into the Utilities Menu by tapping on the gear icon in the Menubar and then choose Settings > MIDI Settings. In the Devices section, locate the Sourcesor Destinations row and tap. In here you can tap on each endpoint to disable sending or receiving MIDI as needed.