0
iPhoneに接続されているすべての周辺機器のリストを取得しようとしています。私はボーズサウンドリンクを接続しているが、それは私のアプリに表示されません。私はUUIDを知っていないので、これは[私が思うすべてを得なければならないので]渡していますか?接続されたすべてのBluetooth周辺機器を取得する方法
func centralManagerDidUpdateState(_ central: CBCentralManager) {
var message = ""
switch central.state {
case .poweredOn:
message = "Bluetooth LE is turned on and ready for communication."
// scan for ALL devices
centralManager.scanForPeripherals(withServices: nil, options: nil)
let connectedPeripherals = self.centralManager.retrieveConnectedPeripherals(withServices: [])
// WILL [] RETURN ALL CONNECTED PERIPHERALS?
print("connectedPeripherals are \(connectedPeripherals)")
}
}
Bluetoothのクラシックだけでなく、本当にBLEですか? – Larme
あなたの記事に感謝を込めてください。https://meta.stackoverflow.com/questions/288160/no-thanks-damn-it –
良い点Larme、Boseは確かにBluetooth Classicです。くそー! – richc