Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode - build setting "EXCLUDED_SOURCE_FILE_NAMES" not working

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?

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

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

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

FolderToBeExcluded
MyProject Folder
 |_
   MyProject Folder

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.

Is it the limitation of EXCLUDED_SOURCE_FILE_NAMES?

like image 315
srus2017 Avatar asked Jun 26 '26 05:06

srus2017


1 Answers

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

The reason subfolders are not excluded is because of the /*. That tells it to look for files in FolderToBeExcluded. If you just give FolderToBeExcluded (no slash after) then it will exclude all files in that folder and all subfolders. At least that is what I found.

like image 54
Jason Avatar answered Jun 29 '26 11:06

Jason