[Feature Request]: Add support to automatically accept/decline bluetooth permissions which started to appear in macOS Big Sur
- Dominant language
- C++
- Stars
- 123k
- Forks
- 17.5k
- Avg merge
- 14h 28m
- Merged PRs (30d)
- 870
Description
**Preflight Checklist**
* [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
* [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.
**Problem Description**
Starting from Mac OS 11.0.1, Big Sur, Apple introduces explicit Bluetooth authorization. Because of that our Electron app is requesting Bluetooth permissions even if we are not using Bluetooth in our app at all.
Based on my understanding Electron already have a way how to control permissions but bluetooth is not supported currently. https://www.electronjs.org/docs/api/session#sessetpermissionrequesthandlerhandler. AFAIK this function is using Chrome permissions API which is also not supporting bluetooth permissions yet https://developer.chrome.com/docs/extensions/mv2/declare_permissions/#manifest.
Please correct my expectations if they're incorrect.
**Proposed Solution**
'ses.setPermissionRequestHandler(handler)' should support bluetooth permissions if possible.
**Alternatives Considered**
I can also think about having some boolean flag to specify if app needs bluetooth or not, but usage of current API via 'setPermissionRequestHandler(handler)' is probably much better.
**Additional Information**
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.