xcode 缺少资产目录编译器选项
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19145089/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Asset Catalog Compiler Options missing
提问by farski
I just switched a project over to using Asset Catalogs for icons and launch images. It appears that something has gotten borked, though, because the assets are not getting built into the app. I can't be sure, but I suspect the problem is related to the fact that the Asset Catalog Compiler – Optionspanel is missing from my project/target Build Settings. In new apps, or other apps that I have switched over, once the target is using an Asset Catalog that panel will appear. For this project, when I enable an catalog (under the General tab), I get ASSETCATALOG_COMPILER_APPICON_NAME
and ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME
, but they are listed under User-Definedsettings, and the other settings that should appear in the
Asset Catalog Compiler are missing.
我刚刚将一个项目切换到使用资产目录作为图标和启动图像。不过,似乎有些东西已经无聊了,因为资产没有被内置到应用程序中。我不确定,但我怀疑问题与我的项目/目标构建设置中缺少Asset Catalog Compiler – Options面板有关。在新应用程序或我切换的其他应用程序中,一旦目标使用资产目录,该面板就会出现。对于这个项目,当我启用一个目录(在 General 选项卡下)时,我得到ASSETCATALOG_COMPILER_APPICON_NAME
和ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME
,但它们列在用户定义的设置下,而其他应该出现在资产目录编译器中的设置丢失了。
Anyone have any ideas how to coerce Xcode to find these settings?
任何人都知道如何强制 Xcode 找到这些设置?
回答by farski
Evidently the Build Settingswon't parse asset-related settings correctly unless there is an asset in the Copy Bundle Resourcesof the target. Simple solution, but something I overlooked, since migrating to an asset catalog for icons and launch images apparently doesn't always add itself to the target automatically.
显然,除非目标的复制捆绑资源中存在资产,否则构建设置不会正确解析与资产相关的设置。简单的解决方案,但我忽略了一些东西,因为迁移到图标和启动图像的资产目录显然并不总是自动添加到目标中。