I saw this and answers in stackO, but didn't find how to exclude folders.
I have 3 folders with a lot of .h , .m and .mm and i need to exclude them temporary, but not to remove references. How can i do that?
I saw this and answers in stackO, but didn't find how to exclude folders.
I have 3 folders with a lot of .h , .m and .mm and i need to exclude them temporary, but not to remove references. How can i do that?
无法发表评论,但想指出,除非我做错了什么,否则在使用EXCLUDED_SOURCE_FILE_NAMES
其他回答中解释的构建设置时,使用类似的内容排除文件夹*/Folder/*
不会排除 的子文件夹中的任何内容Folder
,但仅直接在里面的文件。如果您有另一个文件夹,例如。/Folder/Subfolder/
,您还必须包含*/Folder/Subfolder/*
以排除其中的任何文件。至少在 Xcode 10.3 中是这样的。
例子:
[Folder]
item.txt
[Subfolder]
image.png
info.plist
*/Folder/*
将排除item.txt
and info.plist
,但不排除image.png
。
*/Folder/Subfolder/*
将排除image.png
.
此答案仅涵盖如何从构建或匹配文件模式中排除文件。从路径或文件夹中排除当前尚未在 Xcode 中实现
editor
Add Build Setting
Add User Defined Settings
中为此选择要为其添加用户定义设置的项目。EXCLUDED_SOURCE_FILE_NAMES
或者
您可以使用文件检查器并在目标成员中只uncheck
使用您不想包含在构建中的文件
同样的事情可以在你想要的地方编译源类别。select the file
add
build