You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error "The workspace contains multiple references with the same GUID" #1554
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?
Only through transitive dependencies. We have an SPM-Package A that includes B, and we also have to include B ourselves in the project spec again to use it in the main app.
And sorry for the late response, I haven't received any notification.
Activity
yonaskolb commentedon Jul 2, 2025
Do you have duplicate packages referenced in your project spec?
niklas-tag24 commentedon Jul 9, 2025
Only through transitive dependencies. We have an SPM-Package A that includes B, and we also have to include B ourselves in the project spec again to use it in the main app.
And sorry for the late response, I haven't received any notification.
niklas-tag24 commentedon Jul 11, 2025
@yonaskolb
niklas-tag24 commentedon Jul 16, 2025
I've create a minimal "working" example here https://github.com/niklas-tag24/ExampleXcodegenIssue
niklas-tag24 commentedon Jul 29, 2025
@yonaskolb Have you already found the time looking at the minimal example I've provided?
yonaskolb commentedon Jul 30, 2025
Hi @niklas-tag24, I tried your project and could reproduce that generating while the project is open leads to the error
Missing package product 'MyPackage'. I believe it's due to a long standing bug in Xcode https://forums.swift.org/t/missing-package-product-error-for-all-local-swift-packages-when-switching-git-branches/38041/54. Sorry I can't offer more helpyonaskolb commentedon Jul 30, 2025
Xcode just doesn't like when it's project changes out from underneath it, even in branch switching scenarios
niklas-tag24 commentedon Jul 30, 2025
Thank you for your reply. :) So it seems that the only "fix" would be to remove local packages from our app, right?