The re-interconnection of Bluetooth is mainly divided into the following two kinds:
1, restore some known devices, known devices are in this operation before you scan or have been connected to the device. Use retrieveperipheralswithidentifiers: function to complete the reply operation.
2, to restore the connected devices, here and the above known equipment to distinguish between. The device here means that the device is connected to the phone at this point. When will this happen? This is where the device can be used by multiple applications, and this device is very powerful and has multiple service for others to use. Now other applications are using this device, so the device stays connected to the system. This is where you can use retrieveConnectedPeripheralsWithServices:
to recover such connected devices.
Retrieve a list of peripheral devices that is currently connected to the system using the retrieveConnectedPeripheralsWithServices:
method. If the peripheral you ' re looking for
None of the above two functions require a callback function to return the recovery result, and the return value of the function is the list of devices that can be recovered.
The following is a general procedure for recovering and connecting devices, where the official Apple process is quoted:
STEP1: operation to recover a known device
STEP2: operation to restore connected devices
STEP3: operation to scan the connection
In these three steps, you should connect the devices you can connect to.
To learn more about Apple's core Bluetooth framework, it's good to see the official guide.
https://developer.apple.com/Library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/ Aboutcorebluetooth/introduction.html#//apple_ref/doc/uid/tp40013257-ch1-sw1
I belong to the introduction, there are any errors or deficiencies can contact me, thank you!
IOS Bluetooth Reconnect