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.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)