yonaskolb / yonaskolb/XcodeGen

How to solve this issue ?

Open
#1,393 2 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

My directory structure is like this:

ModuleName.xcodeproj
ModuleName-| Cache | Cache.swift
           | Other.swift
           | project.yml

And project.yml is like this:

  sources:
        - path: ../ModuleName

the project.pbxproj is like this:

37A939F6615B5BA91AE2A93A /* ModuleName */ = {
            isa = PBXGroup;
            children = (
                36E07E7F6383BA23F4B8E79C /* Cache */,
                3789EBB3D0FCEAE7EC3CF6EE /* Other.swift */,
...
}
 
4198CE16A3FB7B27105EF115 = {
            isa = PBXGroup;
            children = (
                36E07E7F6383BA23F4B8E79C /* Cache */,
                5C3044C94C89DDAD031C461E /* ModuleName */,
 ...
}
 
...
mainGroup = 4198CE16A3FB7B27105EF115;
...

So xcodebuild is saying that "The file reference for "ModuleName/Cache" is a member of multiple groups ("ModuleName" and ""); this indicates a malformed project. Only the membership in one of the groups will be preserved (but membership in targets will be unaffected). If you want a reference to the same file in more than one group, please add another reference to the same path."

How can I resolve this ?
I tried createIntermediateGroups true but it didn't work.

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 by comparing the sources entry in project.yml with the ModuleName and mainGroup entries in project.pbxproj, including the createIntermediateGroups setting. Reproduce the generation and run xcodebuild; done means the generated project no longer reports that ModuleName/Cache belongs to multiple groups.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.