Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 6 CoreBluetooth Pairing / Forgetting (2 questions)

We have a bondable (when we connect we are asked to Pair, see question 2) Bluetooth 4.0 peripheral that we have manufactured and have written an iOS app for.

Question 1

Is it possible in iOS 6 with CoreBluetooth to remove our peripheral from the iOS Bluetooth Settings from within our app or is this restricted to only going to iOS Settings / Bluetooth / Our Peripheral and "Forget this device".

What we are trying to do is when we remove our peripheral from within our app, we expect this peripheral to be removed from the iOS Bluetooth list as well.

Question 2

My second question is, does iOS SDK provide a way to determine if a user has chosen "Pair" or "Cancel" on the Pairing request alert? As of now, we determine the user pressed pair by reading our services / characteristics when the device is connected.

Pairing example

like image 975
WrightsCS Avatar asked Sep 30 '12 01:09

WrightsCS


Video Answer


1 Answers

  • Question 1

No, I really dont think so. Clearing it through settings is the only possible way.

  • Question 2

The centralManager delegate has callbacks for both failed and successfully connected peripheral, so I would listen to them to check if user cancelled or not: didConnectPeripheral and didFailToConnectPeripheral

like image 146
chwi Avatar answered Sep 28 '22 11:09

chwi