Skip to content

Instantly share code, notes, and snippets.

View MaximBazarov's full-sized avatar
💤
ZEN

Maxim Bazarov MaximBazarov

💤
ZEN
View GitHub Profile
@dive
dive / xed_xcode_invocation_tool.md
Last active September 4, 2024 02:20
Xcode invocation tool - xed

Xcode invocation tool - xed

xed is a command-line tool that launches the Xcode application and opens the given documents (xcodeproj, xcworkspace, etc.), or opens a new document, optionally with the contents of standard input.

If you work from the command line, this tool is a better option than open (which can open Xcode projects as well). Why?

  • xed knows about the current selected Xcode version (open behaves unpredictably if you have multiple Xcode installed)
  • You can use it open all files from a specific commit (with a little help explained below). It is useful on code-reviews or when you want to explore significant changes in the repository
  • You can use it as a "quick open" helper. Helps with monorepo phenomena, when you have hundreds of projects in the repository (I will show you an example below)
@mergesort
mergesort / run_in_xcode.scpt
Last active April 10, 2025 13:11
Cursor -> Xcode -> Cursor AppleScript
tell application "System Events"
if (name of processes) contains "Xcode" then
-- Check if Xcode is already the active/focused application
if (name of first application process whose frontmost is true) is not "Xcode" then
tell application "Xcode 16.2 (Beta)"
activate
delay 0.25 -- Wait for Xcode to become active
end tell
end if