electron / electron/electron

[Feature Request]: Add support to automatically accept/decline bluetooth permissions which started to appear in macOS Big Sur

Open
#27,490 0 comments 1 reaction 0 assignees View on GitHub
component/bluetooth enhancement :sparkles:
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.