Does not work on iOS 10.2
With the code snippet in README,
beeTee.enableBluetooth() fails to lighten the bluetooth logo in Control Center.
But while I toggle the bluetooth manually, I can get the notification like PowerChanged and ConnectabilityChanged
Works fine for for me (iOS 10.2, iPhone SE):
My device is iPhone 7, confirmed does not work with latest BeeTee code.
Do you need some logs, I can help provide more infos for debug.
This would be awesome. And maybe some detailed description what you did in which order.
I used the example code snippet in README,
class Demo: BeeTeeDelegate {
let beeTee = BeeTee()
init() {
beeTee.delegate = self
beeTee.enableBluetooth()
beeTee.startScanForDevices()
}
func receivedBeeTeeNotification(notification: BeeTeeNotification) {
switch notification {
case .DeviceDiscovered:
for device in beeTee.availableDevices {
print(device)
}
default:
print(notification)
}
}
}
And start the Demo in viewDidLoad(), full code is
override func viewDidLoad() {
super.viewDidLoad()
demo = Demo()
}
Before I run the code in Xcode, I turn off the bluetooth in Control Center, then Run app in Xcode. When app launches, I pull up the Control Center, the bluetooth indicator is still off. The logs print in console is
Registered PowerChanged
Registered AvailabilityChanged
Registered DeviceDiscovered
Registered DeviceRemoved
Registered ConnectabilityChanged
Registered DeviceUpdated
Registered DiscoveryStateChanged
Registered DeviceConnectSuccess
Registered ConnectionStatusChanged
Registered DeviceDisconnectSuccess
AvailabilityChanged
While app is running, I turn on the bluetooth in Control Center, app will print the following logs
PowerChanged
ConnectabilityChanged