Repository navigation
fix(macOS): add NSBluetoothAlwaysUsageDescription so BLE CLI tools don't SIGABRT - #16686
Open
terra-alex wants to merge 1 commit into
Open
terra-alex wants to merge 1 commit into
terra-alex wants to merge 1 commit into
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @terra-alex on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
Author
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #16685
Supersedes #14551, which was auto-closed while the CLA and issue link were pending. Same one-line change, rebased on current
master.Problem
macOS attributes a child process's TCC privacy request to the responsible process — the terminal. When a CLI launched inside Warp calls CoreBluetooth, macOS looks in Warp's
Info.plistforNSBluetoothAlwaysUsageDescription; when it's absent the child is killed withSIGABRT:and the user has no way to grant Bluetooth access. This breaks every BLE tool run from Warp (
bleak/pyobjc scripts, BLE CLIs, etc.).script/update_plistalready declares the sibling TCC usage strings — AppleEvents, Camera, Microphone, Contacts, Calendars, Reminders, Location, PhotoLibrary. Bluetooth is the one omission.Fix
One line, matching the existing pattern:
Why the string alone is sufficient (no entitlement change)
iTerm2 fixes the identical issue with the string alone (added in iTerm2 3.5.0). Its code-signing posture is the same as Warp's — Developer ID + hardened runtime, shipping
com.apple.security.device.cameraandcom.apple.security.device.audio-inputbut nocom.apple.security.device.bluetooth— and BLE tools run from it without SIGABRT. The hardened-runtime device entitlement governs the entitled process's own direct access; the hosted CLI is a separate process and only needs the responsible app's usage string. Soscript/Entitlements.plistdoes not need to change.The string is inert until a hosted process actually calls CoreBluetooth — it does not make Warp itself request Bluetooth on launch.
References
NSBluetoothAlwaysUsageDescriptionin 3.5.0 (iTerm2 issues Opt-in: bare left-drag selects in TUI without holding Shift on macOS #10353 / spec(GH9731): address Oz review on search scope, name normalization, Seti provenance #10360)Manual testing
A controlled A/B on macOS 26.4.1 (Apple Silicon). There are two minimal app bundles, identical except for this one Info.plist key. Each spawns a child shell that runs a CoreBluetooth script, the same responsible-process relationship as Warp → shell → CLI. The script creates a
CBCentralManagerand runs the run loop for 4 s.NSBluetoothAlwaysUsageDescriptionnamespace: TCC, "must contain an NSBluetoothAlwaysUsageDescription key", the same report Warp produces todayCBManagerState5 (poweredOn), exit 0The same script under the current Warp release (v0.2026.10.21.08.25.02) is killed with the identical TCC termination (
responsibleProc: "stable"). Under iTerm2, which ships this key, it runs. That confirms the usage string alone is what TCC requires; no entitlement change is needed.I have not built Warp itself from source for this check. The change is a single
plutil -insertline identical in form to the ten existing ones above it.