Originally created by: kristofferR
Messenger calls could not get the camera or microphone in any signed build. Under the Hardened Runtime, macOS refuses to even show the TCC prompt unless the app declares the matching device entitlements, and Carrier declared neither — so getUserMedia was rejected before the user ever saw a dialog.
tccd states it plainly:
Prompting policy for hardened runtime; service: kTCCServiceCamera requires entitlement
com.apple.security.device.camera but it is missing for io.github.kristofferr.carrier
The fix is the two entitlements, nothing more.
A/B tested on macOS 27 with two ad-hoc-signed debug builds (hardened runtime, identical except for the entitlements) and tccutil reset between runs:
| probe | without entitlements (main) |
with entitlements (this PR) |
|---|---|---|
getUserMedia({audio}) |
NotAllowedError in 35 ms, no prompt |
AUTHREQ_PROMPTING for kTCCServiceMicrophone |
getUserMedia({video}) |
NotAllowedError in 290 ms, no prompt |
AUTHREQ_PROMPTING for kTCCServiceCamera |
getUserMedia({audio,video}) |
NotAllowedError in 8 ms, no prompt |
both prompts, zero entitlement denials |
It originally also patched wry's WKUIDelegate with WebKit's private display-capture SPI, on the theory that screen sharing was auto-denied (tauri-apps/wry#1195). Testing disproved that for supported macOS versions, so the patch is gone:
getDisplayMedia() reaches the real system picker on both builds — SCContentSharingPicker init / setActive: appears in the WebKit GPU process either way.decidePolicyForUserMediaPermissionRequest short-circuits to promptForGetDisplayMedia(UserChoose) whenever canRequestDisplayCapturePermission() is true, which on Cocoa means "ScreenCaptureKit is available" (macOS 13+). The delegate is never consulted, so the patch was dead code.A separate finding, not a code issue: screen capture can still fail silently when a stale TCC record no longer matches the installed binary (Failed to match existing code requirement ... kTCCServiceScreenCapture, two differing cdhashes). tccutil reset ScreenCapture io.github.kristofferr.carrier clears it. Same family as the mounted-DMG problem from [#77] and worth watching if screen share misbehaves in the field.
The dev-only MCP media-capture probes used for this testing land with [#210].
Originally posted by: kristofferR
@coderabbitai review
Originally posted by: kristofferR
@codex review
Originally posted by: coderabbitai[bot]
✅ Action performed
Review finished. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.Originally posted by: coderabbitai[bot]
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
**Configuration used**: Path: .coderabbit.yaml **Review profile**: ASSERTIVE **Plan**: Pro Plus **Run ID**: `fa9059af-6eaf-4140-ac1a-36ca3f7be9fc`📥 Commits
Reviewing files that changed from the base of the PR and between [e26c3f] and e84aef7b9cfed1325883f86d796849d09d5adad0.📒 Files selected for processing (1)
* `src-tauri/entitlements.plist`📝 Walkthrough
## Walkthrough The macOS hardened-runtime entitlements now allow signed builds to access camera and microphone devices. ### Changes **macOS media entitlements** |Layer / File(s)|Summary| |---|---| |**Entitlement wiring**`src-tauri/entitlements.plist`|The hardened-runtime plist enables camera and audio-input access.| **Estimated code review effort:** 1 (Trivial) | ~2 minutes
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation | | :------------------------: | :------- | :-------------------------------------------------------------------------------------------------------------- | | Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. | | Title check | ✅ Passed | The title clearly and concisely describes the added macOS camera and microphone entitlements for signed builds. | | Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. | | Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |✨ Finishing Touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests - [ ] Commit unit tests in branch `fix/macos-screen-share`Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)Comment
@coderabbitai helpto get the list of available commands.Originally posted by: kristofferR
@codex review
Originally posted by: chatgpt-codex-connector[bot]
Codex Review: Didn't find any major issues. Another round soon, please!
Reviewed commit:
4406113f2eℹ️ About Codex in GitHub
[Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Originally posted by: kristofferR
@coderabbitai review
Originally posted by: coderabbitai[bot]
⚠️ Action not completed
Review rate limited. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.Originally posted by: kristofferR
@coderabbitai review
Originally posted by: coderabbitai[bot]
⚠️ Action not completed
Review rate limited. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.Originally posted by: kristofferR
@coderabbitai review
Originally posted by: coderabbitai[bot]
✅ Action performed
Review finished. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.Originally posted by: kristofferR
@codex review
Originally posted by: kristofferR
@coderabbitai review
Originally posted by: coderabbitai[bot]
⚠️ Action not completed
Review rate limited. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.Originally posted by: chatgpt-codex-connector[bot]
Codex Review: Didn't find any major issues. Keep it up!
Reviewed commit:
f520670fb9ℹ️ About Codex in GitHub
[Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Originally posted by: kristofferR
@coderabbitai review
Originally posted by: coderabbitai[bot]
✅ Action performed
Review finished. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.Originally posted by: kristofferR
@codex review
Originally posted by: chatgpt-codex-connector[bot]
Codex Review: Didn't find any major issues. Chef's kiss.
Reviewed commit:
e84aef7b9cℹ️ About Codex in GitHub
[Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Originally posted by: kristofferR
@coderabbitai review
Originally posted by: coderabbitai[bot]
⚠️ Action not completed
Review rate limited. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.Originally posted by: kristofferR
@coderabbitai review
Originally posted by: coderabbitai[bot]
✅ Action performed
Review finished. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.Originally posted by: coderabbitai[bot]