When I try to Archive, I get the following error –
Multiple commands produce '/Users/kumar/Library/Developer/Xcode/DerivedData/project-giaimtwxkjihslcrnslgrczdvfrm/Build/Intermediates.noindex/ArchiveIntermediates/project/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle':
1) Target 'React-Core.common-AccessibilityResources' has create directory command with output '/Users/kumar/Library/Developer/Xcode/DerivedData/project-giaimtwxkjihslcrnslgrczdvfrm/Build/Intermediates.noindex/ArchiveIntermediates/project/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle'
2) Target 'React-Core.common-Hermes-AccessibilityResources' has create directory command with output '/Users/kumar/Library/Developer/Xcode/DerivedData/project-giaimtwxkjihslcrnslgrczdvfrm/Build/Intermediates.noindex/ArchiveIntermediates/project/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle'
If I remove React-Core.common-AccessibilityResources
from Pods, the share extension doesn’t build stating that it needs this Pod.
Stack I am using –
RN - 0.64.2
React - 17.0.1
Node - 14.17.3
npm - 7.5.0
Xcode - 12.5.1
Macbook Air M1
2
Answers
I figured out, that I was having a different configuration of ReactNative for the share extension than the main app, which was importing the dependencies twice.
Here's a snippet from the PodFile
For the share extension, I replaced the config with this
After making this change in
Podfile
, do necessary cleanups,pod install
and it worked fine.Removing
React-Core.common-AccessibilityResources
from target inPodfile
fixed the issue.IF THAT DIDNT WORKED TRY THIS:
I fixed this error by deleting ‘React-Core.common-AccessibilityResources’ from my pod targets. When attempting to archive, make sure you are not using .xcodeproj and using your workspace. Even if you think you are using workspace triple check. Also if you try archiving through the command line you must specifically state workspace.
CREDITS:
How to fix React Native App not building for iOS
Xcode 12 Error: Multiple commands produce AccessibilityResources.bundle