6

I love Xcode 10 dark theme, but I'd like to keep the whole OS on light theme. But by default to have Xcode on Dark theme you have to set the whole OS to Dark.

How can I achieve this?

5 Answers 5

6

Open Terminal and run the following:

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

source: https://medium.com/@pawelurbanowicz/boost-your-productivity-with-macos-mojave-enable-dark-mode-for-xcode-only-33d86e452ea9

3
  • 4
    Doesn't have any effect for me, unfortunately :(
    – Grishka
    Commented Oct 6, 2018 at 1:10
  • This doesn't work for me either. Commented Dec 30, 2019 at 17:58
  • This worked for me on Big Sur for other apps (Like Kindle and Hermes) that don't have a dark mode even when the system is set to dark. To get the bundleId: use osascript -e 'id of app "SomeApp"' from this answer: stackoverflow.com/a/39464824/6411857 Commented Jan 4, 2022 at 20:55
2

1) First ensure you have the appropriate system setup:

defaults write -g NSRequiresAquaSystemAppearance -bool Yes

2) Then use:

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

Enjoy!


You can also configure any other app by knowing its BundleID. For example:

  • App Store.app -> com.apple.AppStore
  • Calendar.app -> com.apple.iCal
  • Mail.app -> com.apple.mail
  • Maps.app -> com.apple.Maps
  • Notes.app -> com.apple.Notes
  • Safari.app -> com.apple.Safari

To restore defaults:

defaults delete -g NSRequiresAquaSystemAppearance
1
  • 1
    I'm on MacOS 10.15.2 Catalina and this doesn't seem to work for any apps. Commented Dec 30, 2019 at 18:03
1

You can use nightowl app to enable dark mode only for Xcode

3
  • Nightowl does allow enabling light mode for individual apps when in system-wide dark mode, but not the other way around, so that solution doesn't work, unfortunately. Commented Dec 30, 2019 at 18:38
  • The app Gray seems to be more versatile, so you can configure the desired look for a specific application regardless of the appearance of the selected OS appearance. You can install it with Homebrew/cask like this: sh brew cask install gray Commented Jan 1, 2020 at 10:43
  • Per its readme file, Gray utilizes the NSRequiresAquaSystemAppearance option that others have suggested, which doesn't seem to work anymore. That method also has the above shortcoming. Commented Jan 2, 2020 at 23:46
0

There didn't seem to be anything that can be done using preferences and such, so I made a plugin for that: https://github.com/grishka/XcodeAppearanceSwitcher

0

On iOS you can

Temporarily opt out by including the UIUserInterfaceStyle key (with a value of Light) in your app’s Info.plist file

Source: https://developer.apple.com/documentation/appkit/supporting_dark_mode_in_your_interface/choosing_a_specific_interface_style_for_your_ios_app

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .