Skip to content

feat(open-in): add Xcode support#1446

Merged
arnestrickmann merged 1 commit intomainfrom
emdash/open-in-xcode-73j
Mar 12, 2026
Merged

feat(open-in): add Xcode support#1446
arnestrickmann merged 1 commit intomainfrom
emdash/open-in-xcode-73j

Conversation

@arnestrickmann
Copy link
Contributor

Summary

  • Add Xcode as an "Open in" app option (macOS only)
  • Uses bundle ID com.apple.dt.Xcode for detection and launching
  • Hidden when Xcode is not installed (hideIfUnavailable: true)

Details

  • Added xcode.png icon to ICON_PATHS
  • Added Xcode app config with two open commands: open -b (by bundle ID) and open -a (by app name) as fallback
  • macOS-only since Xcode is exclusive to Apple platforms

@vercel
Copy link

vercel bot commented Mar 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Mar 12, 2026 6:04pm

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 12, 2026

Greptile Summary

This PR adds Xcode as a macOS-only "Open In" option, following the established pattern used by other IDE and terminal entries in openInApps.ts. It registers the app via bundle ID detection (com.apple.dt.Xcode), adds a fallback open -a command, and includes a new icon asset.

Key observations:

  • The config structure (bundle ID, hideIfUnavailable, platforms.darwin only) correctly matches how similar macOS-exclusive apps are registered.
  • The open -b com.apple.dt.Xcode {{path}} invocation is consistent with iTerm2 and Ghostty; no --args needed since Xcode is document-based rather than CLI-arg-based.
  • Xcode is inserted between terminal and warp in the list, placing an IDE in the middle of the terminal-emulator group. All other IDEs (IntelliJ IDEA, WebStorm, PyCharm, RustRover, Android Studio) live at the bottom of the array; moving Xcode there would keep the ordering consistent.

Confidence Score: 4/5

  • PR is safe to merge; the only concern is a non-critical ordering inconsistency in the app list.
  • The implementation is technically correct and follows established patterns. The single flagged issue is a style/UX concern (list placement) rather than a functional bug.
  • No files require special attention beyond the ordering note in src/shared/openInApps.ts.

Important Files Changed

Filename Overview
src/shared/openInApps.ts Adds Xcode to ICON_PATHS and OPEN_IN_APPS; config is structurally correct but Xcode is placed between terminal emulators rather than with the IDE group at the bottom, and the open command passes a raw path where Xcode may not handle arbitrary directories meaningfully.
src/assets/images/xcode.png New Xcode icon asset added as a PNG; binary file, no code issues.

Sequence Diagram

sequenceDiagram
    participant User
    participant App as emdash UI
    participant OS as macOS
    participant Xcode

    User->>App: Click "Open in Xcode"
    App->>OS: open -b com.apple.dt.Xcode {{path}}
    alt Xcode found by bundle ID
        OS->>Xcode: Launch / bring to front with path
        Xcode-->>User: Opens file/project
    else Bundle ID not found, fallback
        App->>OS: open -a "Xcode" {{path}}
        OS->>Xcode: Launch by app name with path
        Xcode-->>User: Opens file/project
    end
    note over App,OS: hideIfUnavailable=true hides button<br/>when bundleId com.apple.dt.Xcode<br/>is not detected on the system
Loading

Last reviewed commit: e7968b7

Comment on lines +162 to +173
id: 'xcode',
label: 'Xcode',
iconPath: ICON_PATHS.xcode,
hideIfUnavailable: true,
platforms: {
darwin: {
openCommands: ['open -b com.apple.dt.Xcode {{path}}', 'open -a "Xcode" {{path}}'],
bundleIds: ['com.apple.dt.Xcode'],
appNames: ['Xcode'],
},
},
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Xcode placed in the terminal emulator group

The Xcode entry is inserted between terminal and warp, grouping it with terminal emulators (Warp, iTerm2, Ghostty). Xcode is an IDE, and all other IDEs in this file (IntelliJ IDEA, WebStorm, PyCharm, RustRover, Android Studio) are consistently grouped at the bottom of the list. Moving the entry there would keep the logical ordering intact for users browsing the "Open In" list.

Suggested change
id: 'xcode',
label: 'Xcode',
iconPath: ICON_PATHS.xcode,
hideIfUnavailable: true,
platforms: {
darwin: {
openCommands: ['open -b com.apple.dt.Xcode {{path}}', 'open -a "Xcode" {{path}}'],
bundleIds: ['com.apple.dt.Xcode'],
appNames: ['Xcode'],
},
},
},
{
id: 'xcode',
label: 'Xcode',
iconPath: ICON_PATHS.xcode,
hideIfUnavailable: true,
platforms: {
darwin: {
openCommands: ['open -b com.apple.dt.Xcode {{path}}', 'open -a "Xcode" {{path}}'],
bundleIds: ['com.apple.dt.Xcode'],
appNames: ['Xcode'],
},
},
},

(Place this block just before the intellij-idea entry rather than after terminal.)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@arnestrickmann arnestrickmann merged commit ee20469 into main Mar 12, 2026
5 checks passed
@arnestrickmann arnestrickmann deleted the emdash/open-in-xcode-73j branch March 12, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant