When running the following in my podfile
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "React"
target.remove_from_project
end
end
end
I get these warnings:
[!] [Xcodeproj] Generated duplicate UUIDs:
XCBuildConfiguration --
XCBuildConfiguration --
PBXBuildFile --
PBXBuildFile --
What's causing this? I noticed that I have some remnant tvOS targets in my schemes - is that a possible cause?
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,
duplicateUUIDs.txt
grep -E '[a-zA-Z+]+\.(h|m|swift)' -o duplicateUUIDs.txt | sort | uniq -d
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
https://github.com/CocoaPods/CocoaPods/issues/4370#issuecomment-602368518
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With