Disabling some files in Xcode project from compilation

后端 未结 4 604
长发绾君心
长发绾君心 2020-12-06 10:45

I have started a new project in Xcode by duplicating an existing folder, because my new app will have a lot of common features with the old one.

The problem is that

4条回答
  •  心在旅途
    2020-12-06 11:26

    If you need to remove a lot of files, you could create User-Defined Build Setting which should be called EXCLUDED_SOURCE_FILE_NAMES. And add file names or patterns.

    In my case I selected the target I wanted to omit some files, Editor -> Add Build Setting -> Add User-Defined Setting (at first this is greyed out somehow. I selected the project file (just above TARGETS) then reselected target file and was able to create User-Defined Setting) -> name it EXCLUDED_SOURCE_FILE_NAMES -> value something like PREFIX*

    Of course you can create User-Defined Setting for whole project that way all targets will have it.

    Example how it may look: enter image description here

    Original answer: http://lists.apple.com/archives/xcode-users/2009/Jun/msg00153.html

提交回复
热议问题