IOS Bluetooth Reconnect

Source: Internet
Author: User

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.

    • Retrieve a list of known peripherals-peripherals that you've discovered or connected to in the Past-using the retrievePeripheralsWithIdentifiers: method.

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.