11

Building my react native project from Xcode gives the error below;

Multiple commands produce '/Users/USERNAME/Library/Developer/Xcode/DerivedData/PROJECT-grjkuplqgvolxebnwadcuuhwkdak/Build/Intermediates.noindex/ArchiveIntermediates/PROJECT/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle':
1) Target 'React-Core.common-AccessibilityResources' has create directory command with output '/Users/USERNAME/Library/Developer/Xcode/DerivedData/PROJECT-grjkuplqgvolxebnwadcuuhwkdak/Build/Intermediates.noindex/ArchiveIntermediates/PROJECT/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle'
2) Target 'React-Core.common-CoreModulesHeaders-AccessibilityResources' has create directory command with output '/Users/USERNAME/Library/Developer/Xcode/DerivedData/PROJECT-grjkuplqgvolxebnwadcuuhwkdak/Build/Intermediates.noindex/ArchiveIntermediates/PROJECT/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle'

I check other answers for 'multiple commands produce' error but no luck so far. They are mostly related to vector-icons though.

How do I fix this error for AccessibilityResources?

likeachamp
  • 765
  • 4
  • 11
  • 21

3 Answers3

26

Deleting React-Core.common-AccessibilityResources in the Pods project worked for me. Followed the answer from: this possible duplicate question

Pod deletion example

DariusLau
  • 1,043
  • 10
  • 9
18

Removing React-Core.common-AccessibilityResources from target in Podfile fixed the issue.

...
use_flipper!
post_install do |installer|
  flipper_post_install(installer)

  installer.pods_project.targets.each do |target|
    if target.name == "React-Core.common-AccessibilityResources"
      target.remove_from_project
    end
  end
end
...
likeachamp
  • 765
  • 4
  • 11
  • 21
5

Thank you @likeachamp. It worked, on XCode 13 I added a little bit modified:

...
post_install do |installer|
  flipper_post_install(installer)
  installer.pods_project.targets.each do |target|
    if target.name == "React-Core-AccessibilityResources"
      target.remove_from_project
    end
  end
end