innoveit / react-native-ble-manager

React Native BLE communication module
http://innoveit.github.io/react-native-ble-manager/
Apache License 2.0
2.13k stars 768 forks source link

[IOS] App not requesting permission #1275

Closed barakataboujreich closed 3 days ago

barakataboujreich commented 1 month ago

Before open an issue

Describe the bug A user using Iphone 14 with IOS 17 reported that the app is not requesting permission for bluetooth and getting blocked by the app. After reviewing the logs, the event from BleManagerDidUpdateState fired is "unauthorized".

I did the testing on Iphone 15 pro max with IOS 18. The bluetooth permission is asked automatically on App start. even if i deny the permission, i am able to enable it again from the settings. Weirdly enough the user is not able to enable it from the settings, since it does not appear there.

After some research in the issues here, i understood that the IOS automatically requests the bluetooth permission when bluetooth added to the infoplist.

No where in the documentation the bluetooth permission for the IOS is mentioned. Does anyone have an idea why the user iphone is not requesting the bluetooth permission? i already asked the user to reset location or privacy but it did no work.

To Reproduce I am not able to reproduce the issue not on a physical device nor emulator

Expected behavior The app should ask for bluetooth permission os start up. If the user denies the permission, he can enable it in the settings.

Screenshots screenshots sent from the user IMG_0293 (1) (2) IMG_0294 (1) (2)

Smartphone (please complete the following information):

marcosinigaglia commented 3 days ago

The start method request the permission on ios