Skip to content

Instantly share code, notes, and snippets.

@iosdevie
Created May 26, 2021 08:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iosdevie/7c69c11d3eaf3ac84ef701ba0795b102 to your computer and use it in GitHub Desktop.
Save iosdevie/7c69c11d3eaf3ac84ef701ba0795b102 to your computer and use it in GitHub Desktop.
Connecting To Scanned Devices Bluetooth iOS
func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any],
rssi RSSI: NSNumber) {
self.peripheral = peripheral
self.peripheral?.delegate = self
centralManager?.connect(peripheral, options: nil)
centralManager?.stopScan()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment