Skip to content

Commit b232fa9

Browse files
t3dotggclaude
andauthored
fix(desktop): grant camera and microphone entitlements to the signed macOS app (#22170)
Co-authored-by: Claude Opus 4.8 <[email protected]>
1 parent 069e63b commit b232fa9

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

‎scripts/build-desktop-artifact.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,6 +2226,8 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
22262226
assert.include(entitlements, "<string>webcredentials:clerk.example.com</string>");
22272227
assert.include(entitlements, "<string>webcredentials:example.clerk.accounts.dev</string>");
22282228
assert.include(entitlements, "<key>com.apple.security.cs.allow-jit</key>");
2229+
assert.match(entitlements, /<key>com\.apple\.security\.device\.camera<\/key>\s*<true\/>/u);
2230+
assert.match(entitlements, /<key>com\.apple\.security\.device\.audio-input<\/key>\s*<true\/>/u);
22292231
assert.notInclude(entitlements, "keychain-access-groups");
22302232
assert.notInclude(entitlements, "com.apple.developer.web-browser.public-key-credential");
22312233
});

‎scripts/build-desktop-artifact.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,6 +1406,14 @@ ${associatedDomains}
14061406
<true/>
14071407
<key>com.apple.security.cs.disable-library-validation</key>
14081408
<true/>
1409+
<!-- The hardened runtime denies camera and microphone to the app and every
1410+
child process, with no prompt, unless the app claims these. Terminals
1411+
and coding agents inherit the app's TCC identity, so without these a
1412+
command like ffmpeg or imagesnap gets silent access-denied. -->
1413+
<key>com.apple.security.device.camera</key>
1414+
<true/>
1415+
<key>com.apple.security.device.audio-input</key>
1416+
<true/>
14091417
</dict>
14101418
</plist>
14111419
`;
@@ -2883,6 +2891,10 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* (
28832891
"T3 Code connects to devices on your local network for remote environments and commands run by terminals and coding agents.",
28842892
NSScreenCaptureUsageDescription:
28852893
"T3 Code captures the active window when you use the window capture shortcut.",
2894+
NSCameraUsageDescription:
2895+
"T3 Code lets commands run by terminals and coding agents use the camera.",
2896+
NSMicrophoneUsageDescription:
2897+
"T3 Code lets commands run by terminals and coding agents use the microphone.",
28862898
// macOS lists an app under Default web browser only when it opens web
28872899
// pages as documents as well as http and https links (see protocols).
28882900
CFBundleDocumentTypes: [

0 commit comments

Comments
 (0)