CocoaPods file reference is a member of multiple groups

It's caused by duplicate files in different directories. Sometimes Xcode might make mistake and duplicate files when you move files to another directory by dragging in Xcode's Project Navigator (press Command + 1 to open). These duplicated files were left orphans and had not been added to the Xcode project, so everything works OK. However, pod install accepted all files in Development Pods including these orphans.

To find these duplicate files, I have two solutions as follows,

Solution 1

find . -path ./.git -prune -o -type f -exec basename {} + | sort | uniq -d

where -path ./.git -prune -o means to exclude .git directory when finding

Solution 2

  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

Next Step

Delete unnecessary files.


Problem fixed for me by following steps: (I have also done the changes as per @ale0xB suggested)

  1. Clean the project
  2. Close the Xcode
  3. Delete derived data
  4. If you have already installed the POD, kindly delete the “.xcworkspace” & “Podfile.lock” files
  5. Install pod again
  6. Open “.xcworkspace” and Run

This is a bug in Cocoapods -And probably it won't be fixed in a long while-

Running export COCOAPODS_DISABLE_DETERMINISTIC_UUIDS=YES on the Terminal seems to suppress the warnings for now.

EDIT Feb 2016:

In latest version of Cocoapods this has now been moved to the install section of the Podfile: install! 'cocoapods', :deterministic_uuids => false