Xcode - 构建设置“EXCLUDED_SOURCE_FILE_NAMES"不工作 [英] Xcode - build setting "EXCLUDED_SOURCE_FILE_NAMES" not working

查看:110
本文介绍了Xcode - 构建设置“EXCLUDED_SOURCE_FILE_NAMES"不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从我的项目 (Xcode9) 中排除一些 .swift 和 .storyboard 文件以使用 EXCLUDED_SOURCE_FILE_NAMES 进行发布构建.但它对我不起作用.

I am trying to exclude some .swift and .storyboard files from my project (Xcode9) for release build using EXCLUDED_SOURCE_FILE_NAMES. But its not working for me.

是否可以提供任何文件夹名称以完全排除它?如何给多个文件和文件夹名称?

Is it possible to give any folder name to exclude it completely? How to give multiple files and folder name?

如果我给出像 ../ForlderName/* 这样的路径,它就不起作用.

It is not working if I give path like ../ForlderName/*.

文件夹与我的项目处于同一级别.

Folder is at the same level as my project.

是否也可以排除子文件夹文件?

Is it possible to exclude sub-folders files as well?

我可以排除我的层次结构是否

I am able to exclude if my hierarchy is

MyProject Folder
 |_
   MyProject Folder 
    |_FolderToBeExcluded

如果我给了 FolderToBeExcluded/* 它正在工作,但 FolderToBeExcluded 的子文件夹中的文件没有被排除.

If I gave FolderToBeExcluded/* it is working but file in FolderToBeExcluded's subfolders are not getting excluded.

如果我的heirachy是这样的(即要排除的文件夹和项目文件夹都在同一级别)

If my heirachy is like this (ie folder to be excluded and project folder both at same level)

FolderToBeExcluded
MyProject Folder
 |_
   MyProject Folder

如果我给 ../FolderToBeExcluded/或 $(SRCROOT)/../FolderToBeExcluded/两者都不起作用

If I give ../FolderToBeExcluded/ or $(SRCROOT)/../FolderToBeExcluded/ both are not working

如果我直接给出要排除的文件名中的任何一个,它会在不提供完整路径的情况下被排除.

If I give directly any one of the file name which is to be excluded it is getting exclude without giving full path.

EXCLUDED_SOURCE_FILE_NAMES的限制吗?

推荐答案

这似乎是唯一的解决方案:

This seems to be the only solution:

  1. 对排除目录中的每个子文件夹使用没有文件夹的组
  2. 在 EXCLUDED_SOURCE_FILE_NAMES 设置中排除 ${PROJECT_DIR}/{Path to Excluded Folder}/*

这篇关于Xcode - 构建设置“EXCLUDED_SOURCE_FILE_NAMES"不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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