React-native-image-crop-picker: [!] [Xcodeproj] Generated duplicate UUIDs: XCBuildConfiguration --

Created on 19 Apr 2018  路  10Comments  路  Source: ivpusic/react-native-image-crop-picker

Version

  • react-native-image-crop-picker v0.20.1
  • react-native v0.49.3

Platform

  • iOS

Expected behaviour

pod install shows no errors

Actual behaviour

Having this in the pod file

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == "React"
            target.remove_from_project
        end
    end
end

generates these warnings

...
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 27 dependencies from the Podfile and 38 total pods installed.

[!] [Xcodeproj] Generated duplicate UUIDs:

XCBuildConfiguration -- 
XCBuildConfiguration -- 
PBXBuildFile -- 
PBXBuildFile -- 
PBXBuildFile -- 
PBXBuildFile -- 
...

Also get a build error React/RCTDefines.h file not found

Steps to reproduce

pod install this podfile on a new project

platform :ios, '9.3'
target 'MyApp' do
  use_frameworks!
  pod 'Firebase/Core'
  pod 'Firebase/Auth'
  pod 'Firebase/Firestore'
  pod 'Firebase/Messaging'
  pod 'Fabric', '~> 1.7.2'
  pod 'Crashlytics', '~> 3.9.3'
  pod 'Firebase/Crash'
  pod 'Firebase/Database'
  pod 'Firebase/DynamicLinks'
  pod 'Firebase/RemoteConfig'
  pod 'Firebase/Storage'
  pod 'Firebase/Performance'
  pod 'ViroReact', :path => '../node_modules/react-viro/ios/'
  pod 'ViroKit', :path => '../node_modules/react-viro/ios/dist/ViroRenderer/'

  # this is very important to have!
  rn_path = '../node_modules/react-native'
  pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"
  pod 'React', path: rn_path, subspecs: [
  'Core',
  'RCTActionSheet',
  'RCTAnimation',
  'RCTGeolocation',
  'RCTImage',
  'RCTLinkingIOS',
  'RCTNetwork',
  'RCTSettings',
  'RCTText',
  'RCTVibration',
  'RCTWebSocket'
  ]
  pod 'RNImageCropPicker', :path =>  '../node_modules/react-native-image-crop-picker'
end

# very important to have, unless you removed React dependencies for Libraries
# and you rely on Cocoapods to manage it
post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == "React"
            target.remove_from_project
        end
    end
end

Most helpful comment

add this to your podfile:

install! 'cocoapods',
         :deterministic_uuids => false

All 10 comments

this error is not related to this framework, this is Cocoapods issue;

add this to your podfile:

install! 'cocoapods',
         :deterministic_uuids => false

@luna-moonfang that fixes the warning. What is the effect of doing that?

didn't work for me

I came across this issue a few times recently. Although unrelated to this lib, it could be resolved by upgrading cocoapods:

sudo gem install cocoapods

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 had the same error and it was because when using an earlier version of image-crop-picker I added QBImagePickerController and RSKImageCropper to my pod file. Removing that solved it.

add this to your podfile:

install! 'cocoapods',
         :deterministic_uuids => false

Which section in the PodFile?

I placed it likes this and i worked:

platform :ios, '10.0'

install! 'cocoapods',
         :deterministic_uuids => false

target 'Traver' do
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  target 'TraverTests' do
    inherit! :complete
    # Pods for testing
  end

In my case, I used Firebase, but the error occurred when I installed the firebase internal package separately and then installed the firebase again.

(e.g, yarn add @react-native-firebase/app @react-native-firebase/auth react-native-firebase)

and now There is no error when I remove @react-native-firebase/app @react-native-firebase/auth

Check the duplicate package.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DISKONEKTeD picture DISKONEKTeD  路  3Comments

equesteo picture equesteo  路  3Comments

co-de picture co-de  路  3Comments

xuchao321 picture xuchao321  路  3Comments

cwRichardKim picture cwRichardKim  路  3Comments