Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Troy2000

macrumors regular
Original poster
Oct 21, 2009
201
77
Greetings.

While perusing Apple's documentation regarding the implementation of dark mode within existing applications, I have made something of a discovery.

If an application has been built using the most recent SDK (as recent builds should be), it is possible to force said application to use Mojave's dark theme. This is accomplished by modifying the application's Info.plist and adding the following key and string.

Code:
<key>NSRequiresAquaSystemAppearance</key>
<string>False</string>

It should be noted that this modification will cause applications which enforce code signing to crash upon launch. Deleting the _CodeSignature folder within Contents should solve the problem.

I have primarily been using this finding to change the titlebar color of applications which already feature dark themes but it should fully apply Apple's dark theme to any application built using the default system color scheme.

Here is an example of DaVinci Resolve, before and after the modification.

Before:
upload_2018-8-28_17-36-58.png


After:
upload_2018-8-28_17-37-25.png


Another example, using the IINA media player.

Before:
upload_2018-8-28_18-30-22.png


After:
upload_2018-8-28_18-30-31.png


I hope somebody finds this information helpful and thank you for reading!

- Troy (Reddit: Haru-tan)

EDIT: It would appear that I am not the first person to make this discovery. Steve Troughton-Smith's blog explores the dark theme in greater detail.
 
Last edited:
Amazing!

Doesn't even seem to require the latest SDK. I just modified the Info.plist in a build of Gedit Text Editor from quite a few years ago and it worked nonetheless.

The odd app (such as VLC) seems to have a binary-encoded Info.plist file which makes editing tricky. You can fix this via the command line:

plutil -convert xml1 /path/to/Program.app/Contents/Info.plist

And then open the file in a text editor as usual.

Thank you for sharing your discovery!
 
Amazing!

Doesn't even seem to require the latest SDK. I just modified the Info.plist in a build of Gedit Text Editor from quite a few years ago and it worked nonetheless.

The odd app (such as VLC) seems to have a binary-encoded Info.plist file which makes editing tricky. You can fix this via the command line:

plutil -convert xml1 /path/to/Program.app/Contents/Info.plist

And then open the file in a text editor as usual.

Thank you for sharing your discovery!

I wonder if we could use a similar approach "editing an app package's Info.plist" inside the Mojave's /S/L/CoreServices/Finder.app to disable (through boolean true/false) only transparency (overriding the grey menu bar color with "NSColor" function setting it white for ex.) for the Finder menu bar in "light mode", keeping all the other transparencies for the Dock.app , Notification Center etc as they are, untouched.

edit:
fun experiment, in Mojave "dark mode" if you open Terminal and copy/paste:

/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder -NSRequiresAquaSystemAppearance 1

it will show both Finders one in "dark mode" and the other in "light mode".
Just click into Terminal CTRL+Z to stop the "light mode" one.
 
Last edited:
I'm finding some apps do crash if this is added...or I just don't know how to make the change for them.
Good example is MS Word.

As suggested by @Troy2000 , the app you intend to force drawing dark, should have been compiled using the most recent SDK, if so, try to delete (take a backup first of the "_CodeSignature" folder and "Info.plist" for safety) the _CodeSignature folder inside the app package's Contents.

Maybe after editing the plist, a file permission fix could be required, from Mojave Terminal type:

chmod +x /path/Applications/APPname.app/Contents/Info.plist

(or simply drag with mouse/trackpad the plist file path and drop into the Terminal window)

and as @ASentientBot pointed out, be sure when editing your app "Info.plist" that is in plain text and not binary encoded, in the second case you need to convert in xml and re-convert in plist.

edit:
It has been also explained here: https://developer.apple.com/documen...n/choosing_a_specific_appearance_for_your_app
 
Last edited:
Anyone a script that digs through the /Applications/ directory? :D
Nice find!
To add to every app, you mean? That'd be quite simple to write, but I don't know if it's a great idea to apply to every app.

What might be better is a little AppleScript to automatically apply it to an existing app (it could also force the app to open in light mode, I imagine). If people want that, I can probably write it.
 
To add to every app, you mean? That'd be quite simple to write, but I don't know if it's a great idea to apply to every app.

What might be better is a little AppleScript to automatically apply it to an existing app (it could also force the app to open in light mode, I imagine). If people want that, I can probably write it.

This should work too on-the-fly without editing any Info.plist of any /Applications/
pointing the App's unix exec to a determined value

For example copy/paste into Terminal or creating a bash alias or a shell script:

/Applications/YOURAPPName.app/Contents/MacOS/YOURAPPName -NSRequiresAquaSystemAppearance NO
 
This should work too on-the-fly without editing any Info.plist of any /Applications/
pointing the App's unix exec to a determined value

For example copy/paste into Terminal or creating a bash alias or a shell script:

/Applications/YOURAPPName.app/Contents/MacOS/YOURAPPName -NSRequiresAquaSystemAppearance NO
This doesn't work on the apps I tried it with. Info.plist keys aren't passed as arguments to the app binary.
 
  • Like
Reactions: TimothyR734
It does actually appear to work. Here are a couple of screenshots.

This is under build 18A365a.

View attachment 778755
View attachment 778756

It works in any way, I've tested, if using Mojave in "dark mode" and want/prefer an app to show in "light mode" for example the stock Notes.app from Terminal copy/paste:

/Applications/Notes.app/Contents/MacOS/Notes -NSRequiresAquaSystemAppearance YES

OR

/Applications/Notes.app/Contents/MacOS/Notes -NSRequiresAquaSystemAppearance 1


While instead 0 value means NO
[doublepost=1535660215][/doublepost]
This doesn't work on the apps I tried it with. Info.plist keys aren't passed as arguments to the app binary.

As far I know, provided that is known the exact function call name inside the binary file, you can pass/override any value into an unix executable.

edit:
You're right, not on all apps, for ex. VLC as you said, maybe due to the Info.plist binary encoded or to the different SDK. I got this error using that on the VLC unix exec:

VLC media player 3.0.3 Vetinari (revision 3.0.3-1-0-gc2bb759264)
vlc: unknown option or missing mandatory argument `-N'
Try `vlc --help' for more information.
 
Last edited:
  • Like
Reactions: TimothyR734
It does actually appear to work. Here are a couple of screenshots.

This is under build 18A365a.

View attachment 778755
View attachment 778756

Nevermind, sorry @jackluke you were right! Maybe this requires an app built with the latest SDK. That actually makes a lot of sense:

- it works with the built in apps, which all are the latest SDK of course
- the app executable must be parsing that command line argument, which older apps wouldn't know to look for

In any case, the Info.plist edit works on some apps where the command-line argument does not, so it's still the preferred method IMO.
 
Perhaps we could compile a spreadsheet list of "Dark Mode Ready" applications, as it is quite likely that many developers (especially smaller ones) will not bother to update otherwise compatible applications.

For example:

Screens 4.5.8 - Perfect
Microsoft Remote Desktop 8 - Partial
Arduino IDE 1.5.8 - Titlebar Only

Provided Apple does not remove this functionality in upcoming builds, I could write a user friendly utility to enable or disable dark mode for any installed application via checkboxes.

(Screens 4 really does look perfect, incidentally)
upload_2018-8-31_17-43-45.png
 
Hey everyone! Just made a tiny little GUI applet to modify an app's Info.plist automatically. Not tested too thoroughly so use at your own risk, but I thought some of you may like this.
[doublepost=1535779026][/doublepost]Also! Regarding code signing. Deleting _CodeSignature isn't always enough for an Apple-made app, TextEdit for example. You need to also unsign the app's main binary itself.

This tool will do that for you (I can add it to the app if people care enough):
https://github.com/steakknife/unsign
 

Attachments

  • Switcher.app.zip
    51.6 KB · Views: 349
Hey everyone! Just made a tiny little GUI applet to modify an app's Info.plist automatically. Not tested too thoroughly so use at your own risk, but I thought some of you may like this.
[doublepost=1535779026][/doublepost]Also! Regarding code signing. Deleting _CodeSignature isn't always enough for an Apple-made app, TextEdit for example. You need to also unsign the app's main binary itself.

This tool will do that for you (I can add it to the app if people care enough):
https://github.com/steakknife/unsign
Thank you I will try it out :)
 
Hey everyone! Just made a tiny little GUI applet to modify an app's Info.plist automatically. Not tested too thoroughly so use at your own risk, but I thought some of you may like this.
[doublepost=1535779026][/doublepost]Also! Regarding code signing. Deleting _CodeSignature isn't always enough for an Apple-made app, TextEdit for example. You need to also unsign the app's main binary itself.

This tool will do that for you (I can add it to the app if people care enough):
https://github.com/steakknife/unsign
Hi, I tried your tool and tested with a few apps and they work like a charm, thank you.....Only a couple of apps failed to open so I deleted the key and they work again.
 
Last edited:
Greetings.

While perusing Apple's documentation regarding the implementation of dark mode within existing applications, I have made something of a discovery.

If an application has been built using the most recent SDK (as recent builds should be), it is possible to force said application to use Mojave's dark theme. This is accomplished by modifying the application's Info.plist and adding the following key and string.

Code:
<key>NSRequiresAquaSystemAppearance</key>
<string>False</string>

It should be noted that this modification will cause applications which enforce code signing to crash upon launch. Deleting the _CodeSignature folder within Contents should solve the problem.

I have primarily been using this finding to change the titlebar color of applications which already feature dark themes but it should fully apply Apple's dark theme to any application built using the default system color scheme.

Here is an example of DaVinci Resolve, before and after the modification.

Before:
View attachment 778339

After:
View attachment 778340

Another example, using the IINA media player.

Before:
View attachment 778349

After:
View attachment 778350

I hope somebody finds this information helpful and thank you for reading!

- Troy (Reddit: Haru-tan)

EDIT: It would appear that I am not the first person to make this discovery. Steve Troughton-Smith's blog explores the dark theme in greater detail.
I made an Automator Action that does this for you.
I made a Dark Mode and Dark Mode UNDO action.
I have had maybe one or two apps it has crashed, and the UNDO has always fixed it, but still, people should always backup the app before modification. Just right-click it and select compress.
 

Attachments

  • Force DM.png
    Force DM.png
    122.6 KB · Views: 34
  • DM_Undo.png
    DM_Undo.png
    119.9 KB · Views: 35
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.