Cocoapods: [!] [Xcodeproj] Generated duplicate UUIDs:

Created on 12 Oct 2015  ·  33Comments  ·  Source: CocoaPods/CocoaPods

I'm seeing this warning with CocoaPods 0.39.0 (Podfile)

...
2015-10-12 11:18:12.635 ruby[96649:5014573] warning:  The file reference for "Braintree-UI-Localization.bundle" is a member of multiple groups ("Products" and "Products"); 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.
Integrating client project
Sending stats

[!] [Xcodeproj] Generated duplicate UUIDs:

PBXNativeTarget -- /targets/buildConfigurationList:buildConfigurations:baseConfigurationReference:|,buildSettings:|,displayName:|,isa:|,name:|,,baseConfigurationReference:|,buildSettings:|,displayName:|,isa:|,name:|,,defaultConfigurationIsVisible:0,defaultConfigurationName:Release,displayName:ConfigurationList,isa:XCConfigurationList,,buildPhases:buildActionMask:2147483647,displayName:SourcesBuildPhase,files:,isa:PBXSourcesBuildPhase,runOnlyForDeploymentPostprocessing:0,,buildActionMask:2147483647,
...

Related:
https://github.com/braintree/braintree_ios/pull/153
https://github.com/CocoaPods/CocoaPods/issues/3763

Most helpful comment

This has now moved into the Podfile

install! 'cocoapods', :deterministic_uuids => false

See http://blog.cocoapods.org/CocoaPods-1.0/ for more info

All 33 comments

Hmm, interesting. I'll try and look into this, but to be perfectly honest deterministic UUID fixes are at the bottom of my to-do list, since deterministic UUIDs can be so easily disabled (and most of the time, the warning is harmless).

I've been wondering if this (and similar issues) is due to some part of project generation and the "Products" group in the xcodeproj being a special group.

I ran into this today, and created an easy way to reproduce the problem. I posted the issue on stackoverflow, and created an example project to demonstrate.

@hborders let me guess, resources or resources bundles? I've gotten reproducible issues for similar issues before, but was unable to fix them, and have been focused on working on the other parts of CocoaPods.

I created an App with a Share Extension. In the App target, I use CocoaLumberjack. In the Share Extension target, I use CocoaLumberjack/Core. When I build without use_frameworks! everything is fine. When I build with use_frameworks!, I get the warnings as @intelliot, but for CocoaLumberjack.framework. If I make both my targets depend on CocoaLumberjack/Core, the problem goes away.

Similar warning for me as @hborders though for me it's using the same pod for tvOS and iOS platform targets. No subspec differences. This is in my fork of TTTAttributedLabel (which adds tvOS support; I've submitted a PR to them).

Similar problem as @rsattar both tvOS and iOS platform targets are using the same pod (SwiftyJSON in my case):

Pod file:

source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!

target 'Sowniczek' do
    platform :ios, '8.0'
    pod 'SwiftyJSON'
end

target 'SowniczekTV' do
    platform :tvos, '9.0'
    pod 'SwiftyJSON'
end

Error:

[..]
Using SwiftyJSON (2.3.1)
Generating Pods project
2015-10-29 16:51:19.812 ruby[44535:2297021] warning:  The file reference for "SwiftyJSON.framework" is a member of multiple groups ("Products" and "Products"); 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.
Integrating client project
Sending stats
Pod installation complete! There are 1 dependencies from the Podfile and 1 total pods
installed.

[!] [Xcodeproj] Generated duplicate UUIDs:

PBXFileReference [..]

I created a small pod with xcassets in its resources, and I got the "Generated duplicate UUIDs" warning, but not the "file reference for is a member of multiple groups" warning. I'm working around this by not using xcassets.

In my case setting export COCOAPODS_DISABLE_DETERMINISTIC_UUIDS=YES seems to suppress the warnings. Using cocoapods 0.39.0 here.

@ale0xB Thanks for the tip. Had the same issue here with almost the same podfile (also ios and tvos mixed).

It seems that COCOAPODS_DISABLE_DETERMINISTIC_UUIDS=YES isn't suppressing these warnings anymore in version 1.0.0.beta.3?

This has now moved into the Podfile

install! 'cocoapods', :deterministic_uuids => false

See http://blog.cocoapods.org/CocoaPods-1.0/ for more info

Ah, so much better!

This is fixed as of 1.0.0.beta.4.

I have this problem, should i update to the beta?

Not fixed even in 1.1.1.

Please open a new issue with concrete steps to reproduce.

I have this issue as well, disabling deterministic_uuids gets rid of the warning but that feels dirty...

If you've got a private pod with a resource bundle in a subspec and then have a Podfile with this subspec in two or more different targets in the same project.

I see it with the following setup in my project yield the warning:

warning:  The file reference for "QBundle.bundle" is a member of multiple groups ("Products" and "Products"); 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.
Pod installation complete! There are 17 dependencies from the Podfile and 44 total pods installed.

[!] [Xcodeproj] Generated duplicate UUIDs:

PrivatePodA.podspec important parts:

  s.subspec 'Base' do |base|
    base.dependency 'PrivatePodA/subspecB'
    base.dependency 'PrivatePodA/subspecWithAResourceBundleQ' # contains pngs, xibs, localizable.strings loaded in code contained in subspecB
  end

  s.subspec 'subspecC' do |specc|
    specc.dependency 'PrivatePodA/subspecB'
  end

Podfile:

abstract_target 'BasePods' do
  pod 'PrivatePodA/Base' 

  target 'Alpha' do 
    pod 'OtherPodOne'
  end

  target 'AlphaTests' do 
    pod 'OtherPodTwo'
  end

  target 'Beta' do 
    pod 'PrivatePodA/subspecC'
  end
end

Please share a project the team can use to reproduce the problem in a new issue

Any update on this issue? I am running into the same problem.

hi @AdamBCo, any relevant updates would be posted to this thread if new information was available. Thanks!

I'm having the same problem. Tons of duplicate UUIDs reported. Seems to be a warning only, though.

The real problem start when builds fail with:

In "Copy Pod Ressources.sh":

ibtool … -resources.sh: line 45: echo: write error: Resource temporarily unavailable
Command /bin/sh failed with exit code 1

UPDATE: Solved by rebooting the machine.

Do you need an example project for this? I have a very small project that produces these warnings.

@hborders if you could file a new issue with the example project that would be super helpful 👍

add 'install! 'cocoapods', :deterministic_uuids => false, :integrate_targets => false' to the root of the pod file, then do pod update. This worked for me.

In my case it was because I have two classes/files with the same name

Same problem here. I am writing a pod for a library that currently relies on ./configure && make and comes with different files using the same name in different locations, which is fine for the command line tools and Xcode itself.

Easy example:

$ pod lib create foo #answer ObjC, No, None, No, foo
$ touch foo/foo/Classes/foo.h && mkdir foo/foo/Classes/bar && touch foo/foo/Classes/bar/foo.h
$ cd foo/Example && pod update #see the warning
$ grep foo.h Pods/Pods.xcodeproj/project.pbxproj

In my example that generates:

$ grep foo.h Pods/Pods.xcodeproj/project.pbxproj 
  4D38399D1BBC46A65E9BB2217792C117 /* foo.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C01038B732558B3E3A2E16EBF4A6FC8 /* foo.h */; settings = {ATTRIBUTES = (Public, ); }; };
  6C01038B732558B3E3A2E16EBF4A6FC8 /* foo.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = foo.h; sourceTree = "<group>"; };
  6EE95B720585AB622155DF74807D6BF9 /* foo.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = foo.h; sourceTree = "<group>"; };
  6C01038B732558B3E3A2E16EBF4A6FC8 /* foo.h */,
  6EE95B720585AB622155DF74807D6BF9 /* foo.h */,
  4D38399D1BBC46A65E9BB2217792C117 /* foo.h in Headers */,
  4D38399D1BBC46A65E9BB2217792C117 /* foo.h in Headers */,

You see, that both files are there with different UUIDs in the PBXFileReference and PBXGroup sections, but only one entry exists for the first of the two files in the PBXBuildFile section. This entry is then used twice in the PBXHeadersBuildPhase section, which triggers the Xcode warning.

It gets even more interesting, when specifying s.header_mappings_dir = 'foo/Classes' in the podspec. You get two additional PBXBuildFile entries for the copying (correct), but the duplicate entries in the PBXHeadersBuildPhase (and the warning) stay the same.

In case anyone who searched about this and stumbled here, this works for me:

$ pod update; pod install

For me it was that my app and app extension depended on the same pod. My app had the deployment target iOS 9 and the Extension naturally iOS 10. So they were using different versions of the same pod, hence building and having some references in the Pods project twice. Fixing the version of the certain pod in the Podfile solved it.

It's caused by duplicate files in different directories.
Sometimes Xcode might make mistake and duplicate files when you move files to another directory.

My solution to find these duplicate files,

  1. copy error messages to a text file named such as duplicateUUIDs.txt
  2. get sorted file names and output duplicated items
    grep -E '[a-zA-Z+]+\.(h|m|swift)' -o duplicateUUIDs.txt | sort | uniq -d
  3. find them in your pod source directory and delete unnecessary files.

Another method to find duplicate files
find . -path ./.git -prune -o -type f -exec basename {} + | sort | uniq -d
where -path ./.git -prune -o means to exclude .git directory when finding

I deleted the Pods directory and run pod install again. Still getting this error.

But this helped: install! 'cocoapods', :deterministic_uuids => false

This has now moved into the Podfile

install! 'cocoapods', :deterministic_uuids => false

See http://blog.cocoapods.org/CocoaPods-1.0/ for more info

it helped me
podfile:

platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
install! 'cocoapods', :deterministic_uuids => false

For me, this was caused by having two ever so slightly different dependency chains. If I updated Crashlytics by itself, I got the warning, but updating GoogleTagManager at the same time would fix it. Looking at the podfile.lock, they both depended on parts of GoogleUtilities with different versions.

Was this page helpful?
0 / 5 - 0 ratings