0

I use Xcode 10 and added all required stuff for DarkMode support. When I run the project on Mojave everything works. But when I archive and distribute the app using Xcode 10 on HighSierra, then my app doesn't appear in dark mode on Mojave. Shouldn't Xcode 10 archive Mojave compatible version anyway?

  • Are you building with the 10.14 SDK? You can try adding the `Info.plist` key `NSRequiresAquaSystemAppearance` with a value of `false` to force dark mode – TheNextman Oct 18 '18 at 15:33
  • 1
    Both Xcode 10 and Xcode 9 running on High Sierra will produce an app that supports dark mode on Mojave if the app is being linked against macOS 10.14 SDK. Given your app runs, which uses the Debug configuration, but you say does not if archived, which uses the Run configuration, you might want to check these two configurations of your project and look for differences you wouldn't expect (there are of course differences, that's the point!). – CRD Oct 18 '18 at 21:12

2 Answers2

0

Possible reasons:

  • You are using command line to create the archive, but your toolchain is set to use Xcode 9
  • You are using Dark Mode specific assets in asset catalog. Dark versions of those assets can only be compiled using Mojave.
pointum
  • 2,987
  • 24
  • 31
0

For some reason, the asset catalog created with Xcode 10 only contains the dark mode colors and images if Xcode is run on a macOS 10.14 Mojave system or newer! This means for full Dark Mode support it's not enough to just use Xcode 10, you must run Xcode on macOS 10.14 or newer.

The Cocoa APIs for Dark Mode can still be used, so you can compile an app supporting Dark Mode with Xcode 10 on macOS 10.13, but the asset support will be missing.

DarkDust
  • 90,870
  • 19
  • 190
  • 224