Automate your Xcode workflow / Dev tools with keyboard shortcuts

Hardware

As developers, we start and switch a lot between common developer applications each day. You can buy some external hardware keyboards to achieve this, like for example with these USB Mini 3-Key Keypad, or the HUION Keydial, 9-Keys USB Mini Keypad, Programming Macro Pad. They work fine but you must always pack them in your bag when going to your workspace, but make sure before purchasing them, that they have macOS software drivers.

macOS Shortcuts

Personally I have the Huion, and use it for general Xcode keyboard shortcuts — like show / hide panes, delete current line, Run, Stop, etc, and to save keys I use macOS Shortcuts to launch applications like Xcode.

To achieve this do the following:

  1. open Shortcuts
  2. tap on the + in the title bar
  3. In the categories tab on the right, select Open App, and drag it on the canvas
  4. Click on App, to select Xcode
  5. Click on the info circle top right > Add keyboard shortcut > Control+Option+Command+x
  6. If you see on the canvas, Receive input from, deselect all
  7. Tap on the default name in the title: Open App, to change it to Open Xcode, and you can optionally assign an icon, but this is not really needed.
  8. Now comes the confusing part, there is no save, you just close this window with the red x
  9. Close Shortcuts
  10. Test by tapping Control+Option+Command+x

Other Dev tools

Now you can repeat this process for your most common developer tools like SourceTree, Interactful, Slack, enjoy!

Xcode tip – rename

When you start developing an app, you don’t often know yet what the real name of your app will be, even you think you know. What do I mean by that?

Well, say you call your app TrainSleeper. You create the new app like this in Xcode and all is fine. Once you create the app in App Store Connect, it might shout at you that someone else owns this name and you cannot use it. You start searching for an app with this name in the store to see it, but it does not exist. This is because you can add an app with a certain name but never publish it. That name stays locked to the person who did this.

Anyway we need a lot of renaming during each development cycle, there is nothing to be ashamed about, it’s a very common task.

For this reason I added a keyboard shortcut to rename.

Give the rename menu function a shortcut.

Go to Settings with CMD + ,

Go to the Key Bindings tab

In filter type rename

In the key column after the rename word press all the keys you want, I selected;

SHIFT + CONTROL + OPTION + COMMAND + R

Why so many keys? Well Xcode has many shortcuts, this avoids conflict with other shortcuts