Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

247
Visualizações
Get Connected AirPlay Device Name

I want to get the name of the AirPlay or Bluetooth device my iPhone is connected to. I have somewhat achieved this with the following code...

let currentRoute = AVAudioSession.sharedInstance().currentRoute
for output in currentRoute.outputs {
    print("Connected port name: \(output.portName)")
}

But, whenever my iPhone is connected to an AirPlay device such as a HomePod or Apple TV, the portName returned is just "Speaker". I would like to get the name of the HomePod or Apple TV. Whenever my device is connected to Bluetooth, though, this works. For example, whenever I am connected to my AirPods, the name "Jacob's AirPods" is returned. Whenever I am connected to another Bluetooth device, the correct name is returned.

I believe that getting the name of the AirPlay device should be possible because Apple does it in their Apple Music app and system-wide. Like bellow...

Sceenshot of AirPlay 2 window on iOS 12

Any suggestions?

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda