Search code examples
iosxcodereact-nativexcode12

Xcode 12 Error: Multiple commands produce AccessibilityResources.bundle


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?


Solution

  • 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
    ...