IAC
An IAC (Inter-App Communication) device is a virtual MIDI device that allows multiple MIDI applications on the same device to communicate with each other.
macOS
macOS comes with a built-in IAC Driver to facilitate MIDI connections between applications. See “Transfer MIDI information between apps in Audio MIDI Setup on Mac” on Apple Support for more information.
Connecting WebMIDICon through IAC Driver to Logic Pro running on the same machine:
iOS
You can buy Midiflow which lets you create virtual MIDI devices that other apps can use. Please note that iOS is not that great at multitasking, and from my experience, the application in the background is automatically killed by the OS after a while.
Connecting WebMIDICon through Midiflow to GarageBand running on the same iPhone: