xcode “复制捆绑资源”中缺少故事板

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18758852/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 03:47:00  来源:igfitidea点击:

Storyboards are missing in "copy bundle resources"

xcode

提问by Brian

I'm using base internationalization to internationalize my app. Once I used it, my storyboards became red in "copy bundle resources" (they were normal before I used base internationalization): enter image description here

我正在使用基本国际化来国际化我的应用程序。一旦我使用它,我的故事板在“复制捆绑资源”中变成红色(在我使用基础国际化之前它们是正常的): 在此处输入图片说明

I have tried Xcode Copy Bundle Resources can't find files, Base internationalization and multiple storyboard not working rightand Base Internationalization and “Could not find a storyboard named […]”. unfortunately, none of them worked for me.

我试过Xcode Copy Bundle Resources can't find files, Base internationalization and multiple storyboard not working rightBase Internationalization and “Could not find a storyboard named […]”。不幸的是,他们都没有对我来说有效。

how can I make it normal?

我怎样才能让它正常?

edit

编辑

this problem still exists in xcode5

这个问题在xcode5中仍然存在

回答by Ausiàs

Make sure you have all the "Localizable strings" checkboxes ticked in the file inspector when the MainStoryboard file is selected.

确保在选择 MainStoryboard 文件时在文件检查器中勾选了所有“可本地化字符串”复选框。

I had a problem that looks similar. I transitioned my project's main storyboard to use base internationalization. When selecting the MainStoryboard file, in the file inspector, I saw a new entry called Base, which was using the English localization. So, thinking that "Base" already accounted for the english part I unchecked the English "Localizable Strings" entry in the file inspector. Apparently that was the origin of my problems. After that, the MainStoryboard file would show up in red in the "Copy bundle resources" list. Checking again the English localizable strings entry fixed the problem.

我遇到了一个看起来相似的问题。我将项目的主故事板转换为使用基础国际化。在选择 MainStoryboard 文件时,在文件检查器中,我看到一个名为 Base 的新条目,该条目使用的是英文本地化。因此,考虑到“Base”已经占了英语部分,我取消了文件检查器中的英语“Localizable Strings”条目。显然这是我问题的根源。之后,MainStoryboard 文件将在“复制捆绑资源”列表中显示为红色。再次检查英文本地化字符串条目修复了问题。

回答by SubstanceMX

Unchecking "Localizable Strings" may need also first copy your storyboard elsewhere, then do the uncheck and then import your storyboards again in your xcode project.

取消选中“Localizable Strings”可能还需要首先将您的故事板复制到其他地方,然后取消选中,然后在您的 xcode 项目中再次导入您的故事板。