IOS list of available Bluetooth devices with software information

I am new to this community. I need help resolving a problem with Bluetooth in Objective-C. I want to open all available Bluetooth devices and get information about an existing connection. (Not scanning peripherals!) Is this possible in iOS? For example, the list in settings> Bluetooth!

+5
source share
1 answer

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 . :-)

0
source

Source: https://habr.com/ru/post/1204985/


All Articles