sps
sps

Reputation: 81

Corebluetooth: How to force iPhone to pair to unpaired peripheral

How to force iPhone to pair to unpaired peripheral when peripheral has the pairing information.

Upvotes: 1

Views: 1267

Answers (1)

Paulw11
Paulw11

Reputation: 115104

There is no API for responding to the bonding process in Core Bluetooth.

If the peripheral doesn't require encryption then pairing will happen automatically when the iOS device connects to the peripheral.

If an attribute requires encryption then a pairing (actually bonding) dialog will be shown to the user by iOS when your app attempts to read/write the encrypted data. At this point the user will need to enter the PIN. There is no API that allows your app to complete the bonding without user intervention.

Upvotes: 2

Related Questions