Feat: support file organization using folder reference #249
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do
Removes the option for a list of targets in the iOS configuration from
variants.yml
Improves PBXGroup creation to allow variants files to be organized in folder reference
Fixes the issues of added files not being included in the main target
How can it be tested
In a new project, run the init command, configure the
variants.yml
with test values and run the switch command. Once the command is done, confirm that the files are properly added to the .xcodeproj and the build phase is also including the newly generated files.Task
resolves #244
Additional notes
Reasoning behind removal of list of targets in favor of a single target
Although we have option to provide a list of target this was never implemented. Providing more than one target would lead to unwanted behaviors.
We had the choice to implement the functionality or to remove it completely. If we add it, this means that variants would scale exponentially with the number of targets since variants are applied to all targets. Since the idea of variants is to extend the targets to allow multiple variants, this support would be redundant so we opted to avoid it and remove it completely.
This will also pave the way toward the upcoming functionality related to signing extensions. Since they are also handled as targets in xcode, keeping the target in
variants.yml
as a list would lead to confusion.Checklist:
make validation
locally with success