Xcode Setup for Development — Post Installation

Milan Panchal
Geek Culture
Published in
4 min readJun 7, 2021

--

1) Install Xcode extensions

a. nef extension

  • nef extension is useful for exporting snippets from your code selection to an image or clipboard right from Xcode.
  • The installation guide will be available on https://github.com/bow-swift/nef-plugin

b. Alignment for Xcode

Once you install the extensions you have to enable them.

  • Navigate to System Preferences ➞ Extension ➞ Xcode Source Editor
  • Select all the extension that you are keen to use
  • Relaunch Xcode
Xcode Extension

2) Show Line Numbers and Code folding ribbon

  • Go to Xcode ➞ Preferences ➞ Text Editing ➞ Display
  • Click on the Show: Line Numbers and Code folding ribbon checkboxes
Show Line numbers and code folding ribbon

3) Setting up the theme

  • Go to Xcode ➞ Preferences ➞ Theme
  • Select your preferred theme. I generally preferred the Midnight theme :)
  • Optionally you can customize fonts, spacing, and cursor style

You can also navigate from Editor ➞ Theme ➞ Midnight

Fun fact: Dark themes are becoming more and more popular and they can even save battery power on some devices.

4) Delete unsupported simulators

If you have been using Xcode for quite a few years then there will be chances that old simulators lying on your system and occupying around ~20GB of space.

You can easily remove all unavailable simulators with the single command in the terminal:

$ xcrun simctl delete unavailable

5) Enabling build time

Build time in activity viewer
  • If you’ve ever wondered how long it takes for Xcode to build your project, you can find out with one terminal command:
$ defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES
  • Duration will appear in the activity viewer (The window in the middle top of Xcode’s toolbar area) after a build, alongside the “Succeeded” message.
  • If you are running the app, the status will be replaced by the running status before you can see the duration.

6) Enable “Show Source Control Changes”

  • Go to Xcode ➞ Preferences ➞ Source Control
  • Click on the Show Source Control Changes checkbox under the General menu
Show/Hide or Discard Source Control Changes

7) Remove Key binding for Print and Page Setup

We ofter use keyboard shortcut to improve our productivity. One of them, command I most often use is — ⇧⌘O (Open Quickly…). But somtime accidently I hit ⇧⌘P which will open Page Setup.

To get rid of this I removed key binding for the Print and Page Setup. To do that,

  • Go to Xcode ➞ Preferences ➞ Key Bindings
  • Search for Print and remove shortcut key pressing delete button
  • Search for Page Setup and remove shortcut key pressing delete button

8) Customize Behaviors

In most cases, we do require Debug Area open when we build and run our application. Using ⇧⌘Y or ⇧⌘C short cuts we can toggle/activate the debug area.

To open Debug Area every time we build or run the application we have to customize Xcode behavior:

  • Jump to Xcode ➞ Preferences ➞ Behaviors
  • Select Succeeds under Build option, and enable Show debugger with the option, then select Variables & Console View from the dropdown
  • Follow the same procedure for Starts under Running Menu.
Behaviors

Did you find any of the customization listed in this article helpful? Please comment, What are some of your favorites Xcode Setup?

Questions?

Please feel free to comment below, if you have any questions.

If you like this article, feel free to share it with your friends and leave me a comment. Also, click on the clap button (👏) below to show how much you like the article.

Thanks for reading! 👨🏼‍💻

You can find me on:

Twitter | LinkedIn | GitHub | Medium | HackerRank | LeetCode | Stack Overflow

--

--

Milan Panchal
Geek Culture

iOS Team Lead ǁ Swift ǁ Objective-C ǁ Lifelong Learner ǁ Blogger — Join Medium from the following link: https://medium.com/@milanpanchal24/membership