Dark Mode without linking with the 10.14 SDK?

I really appreciate that Dark Mode is not automatically turned on for existing application versions. Which is a great improvement over previous practices.


But, in the real world, you may not be able to switch to Xcode 10 and link against the 10.14 SDK for multiple reasons (build systems, build environments, 3rd party libraries, backward compatibility support, etc.). Even if your application is 64-bit only.


Yet you may want to support Dark Mode.


Question


How can this be done? Key/value in Info.plist?


I haven't this covered in the WWDC sessions so far (and the advanced session summary does not sound promising for this case).

Accepted Reply

Yes, you can add an Info.plist key "NSRequiresAquaSystemAppearance", with value NO, to force dark mode to be enabled for your application without linking against the 10.14 SDK.

Replies

Yes, you can add an Info.plist key "NSRequiresAquaSystemAppearance", with value NO, to force dark mode to be enabled for your application without linking against the 10.14 SDK.

Thanks. This does exactly what I was looking for.

And the advanced session did discuss this a bit in its "Backwards Deployment" section 🙂