On iOS/iPadOS, with a USB microphone connected, the 'availableInputs' property of AVAudioSession's sharedInstance returns AVAudioSessionPortDescriptions for both the built-in microphone and the USB microphone. On macOS, in an iPad app built for macOS using Catalyst, the only AVAudioSessionPortDescription returned is for a device named 'CADefaultDeviceAggregate-xxxx-x' (where different combinations of numbers occupy the characters designated by 'x'), even when several USB audio devices are connected to the Mac.
We would like for our app to be able to switch between the built-in microphone and external USB microphones (or other USB audio devices) in the Mac version, just as it does in the iPad version. I understand that the user has multiple options for selecting the current audio input/output devices used by the system (System Preferences: Sound and Audio MIDI Setup). However, in order for the Mac version of our iPad app to work, we at least need to get the correct device name and UID for the selected input device, rather than CADefaultDeviceAggregate.
For a specific example, we would like to see the following when a miniDSP UMIK-1 is attached to the Mac (this is some of the info provided in the AVAudioSessionPortDescription for this device on iOS/iPadOS):
Port Name: Umik-1 Gain: 18dB
Type: USBAudio
UID: AppleUSBAudioEngine:miniDSP :Umik-1 Gain: 18dB :00002:1
Does anyone know of a solution or workaround to this problem (it's currently a show-stopper for a Catalyst version of our app)?