cordova-plugin-ibeacon icon indicating copy to clipboard operation
cordova-plugin-ibeacon copied to clipboard

iOS 10 always reports bluetooth not enabled

Open Velissel opened this issue 8 years ago • 4 comments

Hi,

I am testing this plugin on iOS 10, however isBluetoothEnabled always returns false, does anyone have an idea?

It works perfectly on my iOS 8.1 device

Thanks

Velissel avatar Dec 31 '16 07:12 Velissel

Hi,

IOS auto connect with devise... i was tried auto connect with ios

subhash8108 avatar Jan 10 '17 07:01 subhash8108

Apple does not let you find out if the user has bluetooth enabled. This is likely a privacy issue. (IMO its nuts.) If you start ranging you get the "General protection fault" type error: "The operation clouldn't be completed. (kCLErrorDomain error 16.)" BUT: iOS displays an alert "Turning on Bluetooth will improve location accuracy." [Settings, OK] (probably only once and not in airplane mode)

katzlbt avatar Jan 25 '17 08:01 katzlbt

For me isBluetoothEnabled() works when I call requestAlwaysAuthorization() and if I have background location authorization set up.

Otherwise, if I call requestWhenInUseAuthorization(), it always return false...

nilebma avatar Feb 10 '17 05:02 nilebma

I finally used this plugin to know if bluetooth is enabled or not (works with iOS 10) : https://github.com/255kb/cordova-plugin-bluetooth-status

nilebma avatar Feb 10 '17 15:02 nilebma