从存档导出时,DarkMode在Mojave上不起作用 [英] DarkMode doesn't work on Mojave when exported from archive

查看:79
本文介绍了从存档导出时,DarkMode在Mojave上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Xcode 10,并添加了对DarkMode支持的所有必需内容.当我在Mojave上运行项目时,一切正常.但是,当我在HighSierra上使用Xcode 10存档和分发应用程序时,我的应用程序在Mojave上不会以暗模式显示. Xcode 10是否不应该归档Mojave兼容版本?

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?

推荐答案

由于某些原因,如果Xcode在macOS 10.14 Mojave系统或更高版本上运行,则使用Xcode 10创建的资产目录仅包含深色模式的颜色和图像!这意味着要获得完全的黑暗模式支持,仅使用Xcode 10是不够的,您必须在macOS 10.14或更高版本上运行Xcode.

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.

黑暗模式的可可API仍然可以使用,因此您可以在macOS 10.13上编译支持Xcode 10的黑暗模式的应用程序,但是缺少资产支持.

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.

这篇关于从存档导出时,DarkMode在Mojave上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆