Central Manager incorrectly reporting .poweredOff status

Originator:arobinson
Number:rdar://35580104 Date Originated:2017-11-16
Status:Open Resolved:
Product:iOS Product Version:11.2 (15C5107a)
Classification:Serious Bug Reproducible:Always
 
Area:
Core Bluetooth

Summary:

CBCentralManager reports its state as "powered off" despite all other user-facing indications that it's powered on (iOS Settings → Bluetooth is enabled, and Control Center → Bluetooth icon is blue).

Steps to Reproduce:

1. Run the "CentralStateBug" app in the attached project on a hardware device. The app initializes a CBCentralManager instance with a delegate. The delegate implements centralManagerDidUpdateState(_:) which updates a label with a description of the current central state. Verify that it updates the label when bluetooth is toggled.
2. Terminate the app.
3. Open Control Center.
4. Disable Bluetooth connections from Control Center.
5. Enable Airplane mode from Control Center.
6. Disable Airplaine mode from Control Center. Bluetooth connections are automatically re-enabled (or at least that's what the UI indicates).
7. Dismiss Control Center.
8. Launch the "CentralStateBug" app.

Expected Results:

The CBCentralManager state should be .poweredOn.

Actual Results:

The CBCentralManager state is .poweredOff.

Version/Build:

iOS 11.2 (15C5107a)
iOS 11.1.1 (15B150)

Configuration:

iPhone SE iOS 11.2 (15C5107a)
iPhone X iOS 11.1.1 (15B150)

This issue has also been described in the dev forums:
https://forums.developer.apple.com/thread/91664

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!