These instructions are for people who want to build the latest code from github. Expect it to be buggier than releases. If you don't want to build it, you can always install the nightly build.
- Install Xcode from the app store; if you already have it, ensure you have the latest version. Only the latest version of Xcode is supported
- Download the source with this command:
git clone https://github.com/gnachman/iTerm2.git
- Start Xcode.
- File->Open iterm2/iTerm2.xcodeproj
- In the top left, you'll see a pulldown menu that says "iTerm > My Mac". Click on the left part (on iTerm2) and choose Edit Scheme. Make sure Build Configuration is set to Development for debugging or Deployment for speed.
- Select the Project Navigator (cmd-1)
- Click on iTerm2, at the very top of the project tree.
- Select the iTerm2 target.
- Click Build Settings.
- Set Code Signing Identity to Sign to Run Locally (Ad Hoc Code Sign).
- Cmd-R to run.
- Get a small cup of coffee.
- If it launches, congratulations. If not, look in the left-hand pane for errors.
If you're stuck on macOS 10.13 (and therefore Xcode 10.1) you should know that there's a binary framework committed at
BetterFontPicker/BetterFontPicker.framework which will cause you problems. Delete it and rebuild it with Swift version 4.2.