AVRoutePickerView displays incorrect output names

Hi Folks,

I'm currently working on video conferencing app and use AVRoutePickerView for output device selection. Since iOS 16 release it started to display incorrect names for ear-piece and speaker options. For both of them the name is iPhone (before it was iPhone/Speaker) Output changes works correctly but display names confuse.

Here is my audio session configuration:

    private func configureSession() {
        let configuration = RTCAudioSessionConfiguration.webRTC()
        configuration.category = AVAudioSession.Category.playAndRecord.rawValue
        configuration.categoryOptions = [.allowBluetooth, .allowBluetoothA2DP, .duckOthers, .mixWithOthers]

        let session = RTCAudioSession.sharedInstance()
        session.lockForConfiguration()
        do {
            try session.setConfiguration(configuration)
        } catch let error as NSError {
            logError("[AudioSessionManager] Unable to configure RTCAudioSession with error: \(error.localizedDescription)")
        }

        session.unlockForConfiguration()
    }

    

    private func overrideOutputPortIfNeeded() {
        DispatchQueue.main.async {
            guard let currentOutputType = self.session.currentRoute.outputs.first?.portType else { return }
         
            self.session.lockForConfiguration()

            let shouldOverride = [.builtInReceiver, .builtInSpeaker].contains(currentOutputType)

            logDebug("[AudioSessionManager] Should override output to speaker? \(shouldOverride)")

            if shouldOverride {
                do {
                    try self.session.overrideOutputAudioPort(.speaker)
                } catch let error as NSError {
                    logError("[AudioSessionManager] Unable to override output to Speaker: \(error.localizedDescription)")
                }
            }

            self.session.unlockForConfiguration()
        }
    }

Any help appreciated, Thansk!

Experiencing the same thing in developing a VoIP app for the App Store. Apple, need an assist here to get this fixed!

"Speaker" changes to "iPhone" in error once the speaker option is selected.

Have you got update on this?

I"m also seeing this on iOS 17.1 with Xcode 15.2 on an iphone 15 Pro

Any update here. This bug continues to linger and would be nice to fix it and resolve a longstanding user facing issue.

Same issue with VOIP app on iPhone 15 with iOS 18.0.1 😐

AVRoutePickerView displays incorrect output names
 
 
Q