Skip to content

Instantly share code, notes, and snippets.

@stevethomp
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevethomp/1e8d4f60ceda7ba39a43 to your computer and use it in GitHub Desktop.
Save stevethomp/1e8d4f60ceda7ba39a43 to your computer and use it in GitHub Desktop.
Launch your Xcode project quickly, defaulting first to the workspace file for Cocoapods
// Save as ~/Documents/.../OpenXcodeProject.sh
#!/bin/bash
if [ -e *.xcworkspace ]; then
open *.xcworkspace
echo 'Found a workspace file, opening'
elif [ -e *.xcodeproj ];
then open *.xcodeproj
echo 'found xcodeproj, opening'
else echo 'Found nothing!'
fi
// add this to your .zshrc
alias xcopen="~/Documents/.../OpenXcodeProject.sh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment