Estimote / iOS-Fleet-Management-SDK

Estimote Fleet Management SDK for iOS
https://developer.estimote.com
MIT License
1.18k stars 398 forks source link

Feature Request: Add option to disable Bluetooth Settings popup with ESTDeviceManager #279

Closed mhorgan1 closed 4 years ago

mhorgan1 commented 6 years ago

Basic information

Estimote iOS SDK version: 4.27.0 iOS device(s) affected: All models (tested on iPhone 5s and iPhone X iOS version(s) affected: iOS 11.2.6 and iOS 11.3

Additional information

Please read the checklist and place x sign where apropriate for your use case.

Description

I'm creating an iOS app that uses Estimote beacons. It also includes beacon telemetry.

When I launch my app with Bluetooth Off in Settings App, I get a popup on screen to go to settings to turn on bluetooth.

I only get this popup when I instantiate the ESTDeviceManager as follows. If I don't include the below lines, I don't get prompted to turn on bluetooth, but then my Telemetry won't work.

self.deviceManager = [ESTDeviceManager new];
self.deviceManager.delegate = self;

Is there a way to prevent being prompted to go to settings? I have tried the following to see if it would override what's in the EstimoteSDK:

    CBCentralManager* bluetoothManager =[[CBCentralManager alloc]
                    initWithDelegate:self
                    queue:dispatch_get_main_queue() 
                    options:@{CBCentralManagerOptionShowPowerAlertKey: @(NO)}];

Expected behavior:

Have a way to disable the bluetooth settings popup. Get the popup if we set a flag to true

Actual behavior:

Popup to go to settings to turn on bluetooth appears

mhorgan1 commented 6 years ago

I have tried rolling back to Version 4.26.3 and the bluetooth dialog no longer appears.

Was there a flag set inside the old version of ESTDeviceManager that has now been changed in the newest version?

heypiotr commented 6 years ago

I checked and no, there was no such change. Maybe it's something else you've also done in your code?

mhorgan1 commented 6 years ago

Hi Piotr, I have attached a barebones sample app. I am only initialising ESTDeviceManager You can run pod install on the two different versions 4.26.3 and 4.27.0

testimote-mhorgan1.zip