ivpusic / react-native-image-crop-picker

iOS/Android image picker with support for camera, video, configurable compression, multiple images and cropping
MIT License
6.14k stars 1.56k forks source link

[!] [Xcodeproj] Generated duplicate UUIDs: XCBuildConfiguration -- #680

Open mypark opened 6 years ago

mypark commented 6 years ago

Version

Platform

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
2energycell commented 6 years ago

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

luna-moonfang commented 6 years ago

add this to your podfile:

install! 'cocoapods',
         :deterministic_uuids => false
leandromperez commented 6 years ago

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

Wicko-Design commented 5 years ago

didn't work for me

tobias-khs commented 5 years ago

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

acalism commented 4 years ago

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

jcharbo commented 4 years ago

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.

ollyde commented 4 years ago

add this to your podfile:

install! 'cocoapods',
         :deterministic_uuids => false

Which section in the PodFile?

Ernesto385291 commented 4 years ago

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
o-henry commented 4 years ago

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.