yonaskolb / yonaskolb/XcodeGen

If I set xcconfig files, the grouping is broken

Open
#1,482 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
8.8k
Forks
908
Avg merge
17d 14h
Merged PRs (30d)
2

Description

I've got this shells script that generates yaml

base_dir is the root of the project
resources_dir is $base_dir/$name/Resources

create_yaml() {
    local name="$1"
    local base_dir="$2"
    result="
name: $name
configs:
    AppStore: release
    DevelopmentDebug: debug
    DevelopmentRelease: debug
    ProductionDebug: release
    ProductionRelease: release
    StagingDebug: debug
    StagingRelease: debug
configFiles:
    AppStore: $resources_dir/Configs/AppStore/AppStore.xcconfig
    DevelopmentDebug: $resources_dir/Configs/Development/Development.xcconfig
    DevelopmentRelease: $resources_dir/Configs/Development/Development.xcconfig
    ProductionDebug: $resources_dir/Configs/Production/Production.xcconfig
    ProductionRelease: $resources_dir/Configs/Production/Production.xcconfig
    StagingDebug: $resources_dir/Configs/Staging/Staging.xcconfig
    StagingRelease: $resources_dir/Configs/Staging/Staging.xcconfig
targets:
    $name:
        type: application
        platform: iOS
        deploymentTarget: '15.0'
        sources:
            - path: "$base_dir/$name"
            - path: "$base_dir/$name/Resources"
        settings:
            INFOPLIST_FILE: $name/Resources/Info.plist
packages:
    ${name}Facade:
        path: $base_dir/Packages/${name}Facade
"
    echo "$result"
}

Everything seemed to work well until I added configFiles:. Those config files are assigned but the grouping is broken.

Screenshot 2024-06-17 at 13 16 47 Screenshot 2024-06-17 at 13 19 37

If I don't add configFiles, then those config files are not assigned and grouping is correct

Screenshot 2024-06-17 at 13 20 51 Screenshot 2024-06-17 at 13 21 02

Also, to note, Documentation seems to be lacking stuff. I need to do a lot of reverse-engineering/guessing to find out how certain things would work :( Could you please add some more insights regarding grouping stuff properly and setting configs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the create_yaml shell function and compare the generated project with and without configFiles, using the shown YAML paths as the reproduction. Trace configFiles handling alongside project-group generation, then verify that configs are assigned without changing the existing grouping and that the relevant documentation explains both behaviors.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.