yonaskolb / yonaskolb/XcodeGen

Error "The workspace contains multiple references with the same GUID"

Open
#1,554 8 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

Everytime I execute xcodegen in my project, and then build the iOS app, I receive the same error

Build service could not create build operation: unable to load transferred PIF: The workspace contains multiple references with the same GUID 'PACKAGE:1YPFJ9C2MTIAXFLQNBJR1G6455KB9KR79::MAINGROUP'

I always have to close and re-open Xcode in this case, which really hinders programming.

I don't really understand how this can even happen. xcodegen basically only rewrites the pbxproj-stuff without using internal xcode APIs like xcodebuild, right? So why does the build operation complain, does someone have an idea?

I also analysed the pbxproj-changes that xcodegen applies. The weird thing is, even if there are no changes at all (because I've executed xcodegen beforehand) then I also get the same error as before.

So if xcodegen doesn't use Xcode API (I suppose), and there are no changes to the .pbxproj-Stuff, what could xcode even complain about?

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 reproducing the failure when executing xcodegen and then building the iOS app in Xcode, comparing the generated .pbxproj before and after generation. Trace how XcodeGen handles project references and determine what causes duplicate GUIDs; done means the reported build error no longer occurs without restarting Xcode.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.