Open amirRTA opened 7 months ago
i have a similar use case but have 3 targets
ApplicationProd ApplicationStage ApplicationDebug
in the file structure i have
YourApp//Configurations/Debug <- which has all debug specifig files YourApp/Configurations/Stage <- which has all stage specifig files YourApp/Configurations/Production <- which has all prod specifig files
under sources
on the production target you'd do like this.. sources:
and mimick for the others similarly thats how i solved it atleast
another solution could be to use the createIntermediateGroups on the sources and then have different configurations
another solution could be to use the createIntermediateGroups on the sources and then have different configurations
- path: MyApp/Resources
excludes:
- "GoogleService-Infos"
- "GoogleService-Infos/**"
- "GoogleService-Infos/**/*.*"
- path: MyApp/Resources/GoogleService-Infos/DEV
type: folder
buildPhase: none
- path: MyApp/Resources/GoogleService-Infos/INT
type: folder
buildPhase: none
- path: MyApp/Resources/GoogleService-Infos/PROD
type: folder
buildPhase: none
I managed to solve it by defining those path types as folder
(as @alessdiimperio mentioned, createIntermediateGroups option). Please notice that the build phase option none
will not apply to 'info.plist' files but it will work on folder
type.
This is what it should look like. It's an intermediate group referenced directly from disk with no target membership. This worked for me.
Hello, I have used XcodeGen the Great 🥇 in our application and it works flawlessly unless there is one little issue with GoogleService-Info.plist files. I have three GoogleService-Info.plist files, each related to a separate application environment (develop, stage, and production) and I have to use them in a single Xcode target. Following is the MyApp structure.
I added a script in the build phases to select the proper Info.plist file and then copy it inside my app's bundle directory. In this case, I have to set an unselected target membership on them and don't need to have them on copy bundle sources inside build phases.
I tried to set
buildphases: none
for them but it didn't work. This note inside the project spec > buildPhase already mentioned it I guessNote that Info.plist files will never be added to any build phases, no matter what this setting is.
.I'm using the 2.38.0 version of XcodeGen. I'm encountering the opposite case of #1045 please help me THX. 🙏