CoreBluetooth rare glitches

Max
1 min readJul 7, 2016

Recently I found when working with a slightly problematic peripheral, after calling cancelPeripheralConnection, CoreBluetooth does not call didDisconnectPeripheral or didFailToConnectPeripheral as mentioned in the documentation, which seems to indicate that CoreBluetooth is actually waiting for something to happen between the peripheral and itself…

The workaround is to start a guard timer to ensure we can deliver a disconnected notification to the UI layer :D

Reference:

https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/CBCentralManager_Class/#//apple_ref/doc/uid/TP40011284-CH1-SW3

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Max
Max

Written by Max

iOS Developer & Bluetooth LE Veteran

No responses yet

Write a response