Yes and no. It depends on your setup.
No, this is not possible using the public API.
Yes, it is technically possible using BluetoothManager.framework . My BeeTee ยน demo project shows how to encapsulate the base part.
However, based on the AppStore Directive ยง2.5 on private (undocumented) functions, it is not possible to publish applications with BeeTee and BluetoothManager.framework in the AppStore.
If you decide to go with the BeeTee base, you can easily list all the Bluetooth devices in the range:
class Demo: BeeTeeDelegate { let beeTee = BeeTee() init() { beeTee.delegate = self beeTee.enableBluetooth() beeTee.startScanForDevices() } func receivedBeeTeeNotification(notification: BeeTeeNotification) { switch notification { case .DeviceDiscovered: for device in beeTee.availableDevices { print(device) } default: print(notification) } } }
If you are using iOS 11, also consider requesting to transfer to C # 16 . Unfortunately, I'm too busy at the moment to merge this pull request.
ยน I am the author of BeeTee . :-)
source share