0

I am able to go through all of my available audio inputs but I need a way to identify which inputs in the bluetoothHFP category are airpods. I can't key off of "Airpods" in the name since that can be changed by the user.

for input in AVAudioSession.sharedInstance().availableInputs!{
    if convertFromAVAudioSessionPort(input.portType) == convertFromAVAudioSessionPort(AVAudioSession.Port.bluetoothHFP) {
        //How do I tell here that it is airpods and not another HFP device?
    }
}
rmaddy
  • 314,917
  • 42
  • 532
  • 579
user1079052
  • 3,803
  • 4
  • 30
  • 55
  • 1
    I think what you are doing is currently infeasible. There have been questions related to this and detecting if `blutoothHFP` is the best they got. https://stackoverflow.com/questions/46612223/avaudiorecorder-avaudiosession-with-apple-airpods https://stackoverflow.com/questions/54014593/how-to-check-if-airpods-are-connected-to-iphone – Joshua Francis Roman May 29 '19 at 02:27
  • that is what I was afraid of and I have seen that post before. Thank you – user1079052 May 29 '19 at 13:46

0 Answers0