79698579

Date: 2025-07-11 16:08:18
Score: 1
Natty:
Report link

Similar but different to a @Keselme's answer about checking availableInputs
which did not contain CarPlay for me.

More reliable in my case was checking the audioSession's current route's outputs for port type carAudio:


let audioSession = AVAudioSession.sharedInstance()
  for output in audioSession.currentRoute.outputs {
     if output.portType == AVAudioSession.Port.carAudio {
        return true
      }
    }
return false
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @Keselme's
  • Low reputation (0.5):
Posted by: user7804781