yonaskolb / XcodeGen

A Swift command line tool for generating your Xcode project
MIT License
7.03k stars 818 forks source link

Any way to disable automatically searching sources for Info.plist files? #1282

Open carrepbearep opened 1 year ago

carrepbearep commented 1 year ago

Hi there,

Currently, if the INFOPLIST_FILE build setting is not specified, Info.plist files are automatically searched for in the sources. However, the paths specified in the sources section are searched without regard to includes or excludes paths. So even if I exclude the Info.plist file from a source directory, it will still be found. Is this a bug? (I'm using XcodeGen version 2.25.0)

There also does not seem to be a way to disable this automatic search for Info.plist files (correct me if I am wrong). I've tried setting settingPresets: none but it did not disable this behavior.

My current workaround is to include each file individually instead of including the whole source directory to avoid this automatic searching.

This feature would be useful as I would prefer to specify INFOPLIST_FILE only in configuration files, rather than explicitly specifying them or having them included automatically (might include the wrong files) in target-level build settings.

Thanks!

WeijunDeng commented 1 year ago

My workaround is to set INFOPLIST_FILE: "" in a common template.

Uki19 commented 6 months ago

Currently facing the same issue. Im using this workaround in target template so configuration file settings are respected:

settings:
  INFOPLIST_FILE: $(inherited)

But yes, it would be good to be able to disable this automatic info.plist search/resolution.

yonaskolb commented 5 months ago

Would someone like to pick this up? It should involve