3

I am working on a project that some of the apps require bluetooth permission and some of them do not. The ones do not require bluetoth started asking for the permissions in iOS 13. I disabled the configs that are asking for bluetooth, but still, something triggers the bluetooth and iOS 13 shows the bluetooth prompt. Is there anyone experiencing the same problem? What are the solutions to fix this problem?

Solution:

So I realized that I was initializing the bluetooth in a main thread all the time. Instead of doing this, I did lazy initialization and fixed the problem.

jorjj
  • 1,479
  • 4
  • 20
  • 36

1 Answers1

1

If the projects are sharing a single code-base or have shared frameworks, that may be the source, in particular, the dependencies are a good place to look as Andy states above.

I know you stated that you disabled configs asking for Bluetooth, but I'd double-check the two Bluetooth LE options (Uses Bluetooth LE accessories or Acts as a Bluetooth LE accessory) in Background Modes under Capabilities. I'd also check the Info.plist file for Privacy - Bluetooth Peripheral Usage Description and Privacy - Bluetooth Always Usage Description but these shouldn't trigger the prompt, only add information when the prompt appears.

After checking configuration, I would search for import CoreBluetooth to see if there are any files that are using Bluetooth that you might not be aware of. Checking for the import narrows down the scope, then I'd look for CBCentralManager or CBPeripheralManager.