Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

245
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!