Xcode 添加了蓝色文件夹,相关文件未编译

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

Xcode added folder in blue and related there files are not compiling

iosobjective-cxcode

提问by KkMIW

From Xcode project right click and Add File to "projectName"there I created a NewFolder "ABCD"name and added to same "ABCD" empty folder to the project its in Blue colour, I expected its in Yellow Color, What the files which I added inside Blue Colour folder files are not compiling in X-Code all files which added in Blue Colour folder say file is not found after compiling the code.

从 Xcode 项目右键单击,然后Add File to "projectName"我创建了一个 NewFolder"ABCD"名称并将其添加到相同的“ABCD”空文件夹到项目中,它是蓝色的,我希望它是黄色的,我在蓝色文件夹文件中添加的文件没有编译在 X-Code 中,所有添加到 Blue Color 文件夹中的文件都说在编译代码后找不到文件。

Is there any why that default, I added folder are link related to the project?

有什么原因是默认的,我添加的文件夹是与项目相关的链接?

Its very strange for me this issue, Your feedback is very helpful.

这个问题对我来说很奇怪,您的反馈非常有帮助。

回答by Manish Pathak

If you simply drag drop a file and choose Create Folder reference, it will add as a blue folder. Please make sure you select Create Groups from the pop dialogue and make sure u have selected all the targets in Add To Targets section.

如果您只是简单地拖放文件并选择创建文件夹引用,它将添加为蓝色文件夹。请确保您从弹出对话框中选择创建组,并确保您已选择添加到目标部分中的所有目标。

Like this

像这样

enter image description here

在此处输入图片说明

It will be added as yellowenter image description here

它将被添加为黄色在此处输入图片说明

Group-> With groups, Xcode stores in the project a reference to each individual file. This can lead to problems:

Group-> 通过组,Xcode 在项目中存储对每个单独文件的引用。这可能会导致问题:

Folder references-> Folder references are simpler. You can spot a folder reference because it shows up in blue instead of yellow.

文件夹引用-> 文件夹引用更简单。您可以发现文件夹引用,因为它显示为蓝色而不是黄色。