fix(desktop): ship universal native helpers so capture runs on Intel Macs - #1
Draft
mustafaksaeed wants to merge 1 commit into
Draft
fix(desktop): ship universal native helpers so capture runs on Intel Macs#1mustafaksaeed wants to merge 1 commit into
mustafaksaeed wants to merge 1 commit into
Conversation
…Macs The screen-recorder, cursor-monitor, and window-detector Swift helpers were committed as arm64-only, so on Intel (x86_64) Macs every spawn failed with EBADARCH (errno -86 / "Bad CPU type in executable"), breaking recording and screenshots. Rebuild all three as universal binaries (x86_64 + arm64) so the desktop app runs on both architectures. Co-authored-by: Cursor <cursoragent@cursor.com>
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
sardorml
marked this pull request as ready for review
July 2, 2026 08:45
sardorml
self-requested a review
July 2, 2026 08:45
sardorml
marked this pull request as draft
July 2, 2026 11:20
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.
Summary
The desktop app's native macOS helpers —
screen-recorder,cursor-monitor, andwindow-detector— were committed as arm64-only binaries. On an Intel (x86_64) Mac, everyspawnof these helpers failed with EBADARCH (errno -86, "Bad CPU type in executable"), which broke screen recording and screenshot capture entirely:This rebuilds all three helpers as universal binaries (
x86_64+arm64) so the desktop app runs on both Intel and Apple Silicon. The arm64 slice is preserved, so Apple Silicon behavior is unchanged.Changes
apps/desktop/native/screen-recorder/bin/screen-recorder→ universalapps/desktop/native/cursor-monitor/bin/cursor-monitor→ universalapps/desktop/native/window-detector/bin/window-detector→ universalRebuilt from source with the installed Swift toolchain, e.g.:
cd apps/desktop/native/screen-recorder swiftc -O -target x86_64-apple-macos13.2 RecordingWriter.swift spikes/RecordingTapSpike.swift main.swift -o /tmp/x64 swiftc -O -target arm64-apple-macos13.2 RecordingWriter.swift spikes/RecordingTapSpike.swift main.swift -o /tmp/arm lipo -create /tmp/x64 /tmp/arm -output bin/screen-recorder(
cursor-monitorandwindow-detectorare single-fileswiftcbuilds.)Local-dev setup notes (not in this PR — files are gitignored)
Getting a fresh clone running end-to-end on
next dev(port 3032) also required local-only config that can't be committed:apps/web/.dev.vars—BETTER_AUTH_SECRET(openssl rand -hex 32) andBETTER_AUTH_URL=http://localhost:3032(fixesInvalid origin/Base URL could not be determinedon signup).apps/web/.env.local—NEXT_PUBLIC_R2_PUBLIC_BASE_URL=http://localhost:3032/api/r/mediaso the client loads media through the local proxy instead of the prod CDN (fixes black thumbnails + "bucket may have lost CORS access" in the editor).pnpm --filter @captureflow/web db:seed:localto seed local D1.Note:
apps/web/.dev.vars.exampledocumentshttp://localhost:3000, butnext devactually runs on 3032 (next dev -p 3032) — worth aligning in a follow-up.Test plan
spawn Unknown system error -86).file apps/desktop/native/*/bin/*reportsuniversal binary with 2 architectures.