Xcode GPG not found issue

If you use GPG and Xcode you may have run into this error.

Xcode error message saying GPG cannot be found

From what I can tell if doesn’t really matter and you can still commit just fine (in the terminal if you want to use GPG), but it was annoying me. So I went spelunking and found this post on GitHub. In the post the author shares a git config command we can use to solve the issue.

git config --global gpg.program $(which gpg)

Run this in your terminal and then when you create a project in Xcode, the warning should go away. Expect that you’ll need to enter your GPG password (if you have one) on the next project creation.

For reference, here is the gist I followed to set up my GPG key for macOS.

TIL: Xcode has the ability to split editors vertically

I have used VSCode for much of my career (for historical .NETy reasons) and really like its ability to split editor panes. Particularly the ability to split horizontally and vertically. I was bummed when moving to Xcode and found I wasn’t able to do this…Until now!

How to do split editor vertically in Xcode

  1. Open Xcode (seems like it has to be a project, not a playground)
  2. Go to File -> New -> Editor Below (ctrl + option + cmd + T) macOS Xcode menu with Editor Below highlighted

This is very exciting, but I look forward to when other editors support the VSCode feature of dragging those pane corners more than one direction at a time. (VSCode allows you to grab at the corner of two panes and drag horizontally, vertically, or diagonally all in one motion while Xcode and Nova only allow one direction per click).