how to find Bluetooth audio devices in iOS

后端 未结 2 1400
春和景丽
春和景丽 2020-11-29 02:20

Okay, I\'m working on a fun project that has a hurdle where I need to enable Bluetooth audio support for my iOS app.

The hurdle I\'m at is that I simply can\'t even

2条回答
  •  心在旅途
    2020-11-29 02:56

    Swift version

    do {
            try AVAudioSession.sharedInstance().setCategory(.playAndRecord, options: .allowBluetooth)
            try AVAudioSession.sharedInstance().setActive(true)
        } catch {}
    let availableInputs = AVAudioSession.sharedInstance().availableInputs
    

提交回复
热议问题