Boost your productivity with macOS Mojave — enable Dark Mode for Xcode only

Pawel Urbanowicz
3 min readSep 26, 2018

--

During the 2018 WWDC Event Apple introduced macOS Mojave — a successor of macOS High Sierra, bringing one of the most anticipated features in to the Mac.

It was also a great news for Mac & iOS Developers for one particular reason: Xcode, the main IDE and development tool for macOS was missing such feature for ages. There’s a strong conviction among the developers community that using dark IDE or text editor is actually better for your productivity.

It seems to be true given that many of the already existing code editors are supporting dark modes — for example Visual Studio, JetBrains products family and many others. Problem was that such feature wasn’t available in Xcode until the release of macOS Mojave, and when it was released it caused a couple of different issues.

Apps like Mail.app, Calendar.app or even Finder just don’t seem right for many of the people. We as developers got used to using these apps in Light mode, yet we loved the Dark Xcode so badly that it was difficult for us to choose: to enable Dark Mode system-wide or leave it as it was to date, losing the wonderful dark Xcode theme at the same time.

My favourite config on High Sierra and previous versions of the macOS was the Dark Menu Bar with Reduce Transparency enabled. It allowed me to keep all of my applications running Light Mode (as Dark Mode wasn’t available yet) with these great looking, opaque dark menu bar and dock. It saddened me greatly that it was no longer an option in Mojave as well, as I had to choose between system-wide light mode (with light bar and dock) or dark mode, changing the appearance of not only the dock but also windows content.

Then I decided to look for a solution... 🤔

Supporting Dark Menu bar and Dock

There’s an option to leave things as they were to date — with dark menu bar and dock, keeping the window content light on macOS Mojave. First of all, head to System Preferences and select General. From the available appearance options select Light.

Then, head to Terminal. Use following command to make only the menu bar and dock dark:

defaults write -g NSRequiresAquaSystemAppearance -bool YES

Log out from your current session and log back in. Then again, head to System Preferences and select General. This time, as the appearance mode of your choice select Dark.

Enabling Dark Xcode on Light Mode

We’re halfway through, but we’re still missing Xcode support. Close all your Xcode sessions, open terminal and use following command to enable full-fledged Dark Mode only for Xcode:

defaults write com.apple.dt.Xcode NSRequiresAquaSystemAppearance -bool FALSE

Once again, log out from your session and log back in. You should have light mode enabled system-wide, but with the menu bar, dock and Xcode perfectly dark. How cool is that? 🎉

Hope you’ll all enjoy this config as much as I do.

--

--

Pawel Urbanowicz

iOS Developer creating mobile applications professionally since 2014. Motorsport enthusiast and Formula One fanatic.