Hi, team.
We are implementing a process to obtain Bluetooth usage permissions in order to use Bluetooth by iPhone, and we are having some unexpected behavior in the process, so we need someone's help.
The problematic behavior is that the centralManagerDidUpdateState
is not called after the user makes a selection in the Bluetooth authorization dialog.
Expected behavior
- Instantiation of
CBCentralManager
- Bluetooth authorization dialog appears on the screen
- Select "Allow" in the permission dialog
- After selection,
centralManagerDidUpdateState
is called CBManager.authorization
becomes .allowedAlways
Problem behavior
- Instantiation of
CBCentralManager
- Bluetooth authorization dialog appears on screen
centralManagerDidUpdateState
is called before selection- Select "Allow" in the authorization dialog
- After selection,
centralManagerDidUpdateState
is not called
What could cause the centralManagerDidUpdateState
to be called at such a time as the problematic behavior?
Supplementary explanation
CBCentralManager
is held as a property and the instance is not released when the dialog is selected in the problem behavior.CBManagerState
ofCBCentralManager
is .poweredOn andCBManager.authorization
is .notDetermined incentralManagerDidUpdateState
during problem behavior.