Customizing Xcode IDE
This is collection of different tips and tricks, to customize and improve your Xcode IDE
Open Terminal in current Xcode project folder[edit | edit source]
Xcode have ability to run any script with hotkey.
Here is example how to assign hotkey
â+â¥+â+â§+T to open Terminal app in current project folder.
- Create bash script and save it in some folder
#!/bin/bash # Project Name: $XcodeProject # Project Dir: $XcodeProjectPath # Workspace Dir: $XcodeWorkspacePath open -a Terminal "$(dirname $XcodeProjectPath)"
Make script executable: open Terminal at script folder and run
chmod +x your_script_name.sh
Open Xcode Preferences at Behaviors tab
Add new custom behavior by tapping
+ in the bottom left corner
Choose script, which you create previously by clicking at the
Choose Script... twice.
Now you can open terminal in project folder with one hotkey.
This is only one example of using Xcode behaviors, but you can create any script and launch any app with it.
Bash script author: http://mattorb.com/xcode-behaviors-for-fun-and-profit/
Clear derived data with hotkey[edit | edit source]
In the same way as in
Open Terminal in current Xcode project folder example, you can add clear of derived data folder with hotkey.
Create custom behavior (follow the steps in Open Terminal in current Xcode project folder). But use another script.
#!/bin/bash rm -rf $HOME"/Library/Developer/Xcode/DerivedData/"