Building macOS dark mode app on 10.13.6/Xcode 10
Building macOS dark mode app on 10.13.6/Xcode 10
I have a macOS app that uses some image assets specifically for the new dark mode on macOS 10.14. I noticed that when I build the app on Xcode 10 on macOS 10.14 beta, dark mode works correctly. However, when I build the same codebase on Xcode 10 on macOS 10.13.6 and copy it to a macOS 10.14 beta machine, the "Any" resources are used and the user interface looks incorrect.
I can confirm I'm using the same 10.14 SDK in both cases.
I took a look at my app bundles, and noticed that the one built on 10.13.6 has a smaller Contents/Resources/Assets.car
file.
Contents/Resources/Assets.car
Can anyone reproduce this behaviour, and if so, is it expected that I will only be able to build apps supporting dark mode on 10.14? Because that does not make sense to me - Xcode 10 has all the same options for dark mode assets, and as I said I'm using the same SDK in both cases. And I would like to not have to use a beta macOS (and later this month, a brand new macOS) to build this app.
1 Answer
1
I was poking around in the build log, and I found this message:
"Varying images and colors by appearance requires building on macOS 10.14 or later"
So, I have my answer. This is expected behaviour, and you can only build apps with images specifically supporting dark mode on macOS 10.14 or later.
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.