![]() Initialise CoreBluetooth Central ManagerĬentralManager = CBCentralManager(delegate: self, queue: DispatchQueue. Var peripherals = weak var tableView: UITableView! Now make your ViewController Swift file look like this: Make sure the class for the ViewController is set to the class ViewController.Īdd the CoreBluetooth framework to your project.Add an IBOutlet for the UITableView in your ViewController class.Attach the datasource and delegate from the UITableView to the ViewController in the Storyboard.Add a UITableviewCell to the tableview with identifier “cell”.Add a UITableView to the ViewController in the pre-made Storyboard.We will start by looking at Core Bluetooth concepts and how. Create a new single view Swift project. Core Bluetooth is an iOS Framework provided by Apple to build Bluetooth Low Energy applications that communicate with hardware gadgets.Make sure you have an iOS device with BLE and another device that is capable of advertising its BLE services ( I am using an RFDuino, with it’s device name set to Display). This post will show you just the minimum effort needed to get a list of BLE (Bluetooth 4.0) devices that are advertising on your iOS device.
0 Comments
Leave a Reply. |