Skip to content

Instantly share code, notes, and snippets.

@snare
Last active March 15, 2016 04:40
Show Gist options
  • Save snare/3bfc681e704092133337 to your computer and use it in GitHub Desktop.
Save snare/3bfc681e704092133337 to your computer and use it in GitHub Desktop.
Sublime Text project settings to enable building and running Xcode projects. Default build function is to build debug, but includes variants for building release and running both debug and release builds. Just modify the path to your xcodeproj and you're all set.
{
"folders": [
{
"follow_symlinks": true,
"path": "."
}
],
"build_systems": [
{
"name": "Xcode Build",
"cmd": [ "xcodebuild", "-project", "$project_path/$project_base_name.xcodeproj", "-configuration", "Debug" ],
"variants": [
{
"name": "Xcode Run",
"cmd": [ "$project_path/build/Debug/$project_base_name.app/Contents/MacOS/$project_base_name" ],
},
{
"name": "Xcode Build Release",
"cmd": [ "xcodebuild", "-project", "$project_path/$project_base_name.xcodeproj", "-configuration", "Release" ],
},
{
"name": "Xcode Run Release",
"cmd": [ "$project_path/build/Release/$project_base_name.app/Contents/MacOS/$project_base_name" ],
},
{
"name": "Xcode Test",
"cmd": [ "xcodebuild", "test", "-scheme", "$project_base_name", "-project", "$project_path/$project_base_name.xcodeproj", "-configuration", "Debug" ],
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment