yonaskolb / yonaskolb/XcodeGen
Customize `GoogleService-Info.plist` target membership
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 8.8k
- Forks
- 908
- Avg merge
- 17d 14h
- Merged PRs (30d)
- 2
Description
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.
targets:
MyApp:
type: application
platform: iOS
sources:
- path: MyApp
- path: MyApp/Resources/GoogleService-Infos/DEV/GoogleService-Info.plist
buildPhase: none
- path: MyApp/Resources/GoogleService-Infos/INT/GoogleService-Info.plist
buildPhase: none
- path: MyApp/Resources/GoogleService-Infos/PROD/GoogleService-Info.plist
buildPhase: none
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 guess Note that Info.plist files will never be added to any build phases, no matter what this setting is..
- path: Source/Resources/GoogleService-Infos/INT/GoogleService-Info.plist
buildPhase: none
I'm using the 2.38.0 version of XcodeGen.
I'm encountering the opposite case of #1045 please help me THX. 🙏
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Docs/ProjectSpec.md's target source and buildPhase guidance, then trace how XcodeGen handles the three GoogleService-Info.plist paths in the DEV/INT/PROD example. Done means target membership can be customized so these files remain outside build phases while the requested single-target setup works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100