XcodeGen icon indicating copy to clipboard operation
XcodeGen copied to clipboard

How to solve this issue ?

Open Seonny opened this issue 2 years ago • 2 comments

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.

Seonny avatar Aug 29 '23 10:08 Seonny

@yonaskolb do you know why this happens?

freddi-kit avatar Sep 21 '23 05:09 freddi-kit

I don't sorry, would need to do some debugging. I suspect that sources going out of the directory is causing issues path: ../ModuleName. The behaviour may change depending on where xcodegen itself is run (in or outside the directory that contains the project.yml)

yonaskolb avatar Oct 31 '23 07:10 yonaskolb