0

I am working on an App which tries to check bluetooth status of iPhone(ON/OFF) using CoreBluetooth framework.I tested app on iPhone 3GS and iPhone 4 devices to check bluetooth status,which do not support bluetooth LE hardware. Then how can i know bluetooth status on iPhone 3GS and iPhone 4 devices through Objective-C.

user2533604
  • 655
  • 1
  • 11
  • 28

1 Answers1

1

Using CoreBluetooth, you can get this information via the centralManagerDidUpdateState: or peripheralManagerDidUpdateState: callback, depending on which your device is acting as, a central or a peripheral.

If the device doesn't support BLE, you'll get the CBCentralManagerStateUnsupported or CBPeripheralManagerStateUnsupported status. If BLE is turned off for your app, you'll get the CBCentralManagerStateUnauthorized or CBPeripheralManagerStateUnauthorized status. If Bluetooth is turned off on the device, you'll get the CBPeripheralManagerStatePoweredOff or CBCentralManagerStatePoweredOff status.

Big-O Claire
  • 956
  • 8
  • 13