sumanta.k
sumanta.k

Reputation: 527

Multiple commands produce on Xcode 12 and react native

I am trying to build and archive the app for ios. But I am getting the below error. I have a search on StackOverflow and google but my error is a little bit different and I cant understand it. If anyone can help me it will be great.

The exact error:

Multiple commands produce 
'/Users/sumantakundu/Library/Developer/Xcode/DerivedData/Globallove-emwwobuvdzgwhtbdhclymguzjmkg/Build/Intermediates.noindex/ArchiveIntermediates/Globallove/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle':
1) Target 'React-Core-60309c9c-AccessibilityResources' has create directory command with output '/Users/sumantakundu/Library/Developer/Xcode/DerivedData/Globallove-emwwobuvdzgwhtbdhclymguzjmkg/Build/Intermediates.noindex/ArchiveIntermediates/Globallove/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle'
2) Target 'React-Core-AccessibilityResources' has create directory command with output '/Users/sumantakundu/Library/Developer/Xcode/DerivedData/Globallove-emwwobuvdzgwhtbdhclymguzjmkg/Build/Intermediates.noindex/ArchiveIntermediates/Globallove/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle'

My Used Dependencies:

"dependencies": {
"@react-native-async-storage/async-storage": "^1.14.1",
"@react-native-community/masked-view": "^0.1.10",
"@react-native-cookies/cookies": "^6.0.4",
"@react-navigation/drawer": "^5.12.3",
"@react-navigation/native": "^5.9.2",
"@react-navigation/stack": "^5.14.2",
"react": "16.13.1",
"react-native": "0.63.4",
"react-native-gesture-handler": "^1.9.0",
"react-native-image-slider-box": "^1.0.12",
"react-native-ionicons": "^4.6.5",
"react-native-paper": "^3.6.0",
"react-native-reanimated": "^1.13.2",
"react-native-safe-area-context": "^3.1.9",
"react-native-screens": "^2.17.1",
"react-native-tableview-simple": "^4.2.1",
"react-native-vector-icons": "^8.0.0",
"react-native-webview": "^11.2.1",
"rn-webview": "^0.1.0"

},

iOS Xcode Build Settings screenshot below:

enter image description here

My POD file:

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

platform :ios, '10.0'

target 'Globallove' do
config = use_native_modules!

use_react_native!(:path => config["reactNativePath"])

#target 'GloballoveTests' do
#inherit! :complete
# Pods for testing
#end

# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!({ 'Flipper' => '0.74.0' })
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
end

Upvotes: 7

Views: 18080

Answers (8)

HannahCarney
HannahCarney

Reputation: 3631

We got this error because someone had stuck a pod at the top of our podfile when it should be inside the target:

target 'x' do # ...

pod 'Permission-FaceID', :path => "#{permissions_path}/FaceID"

...

post_install do |installer| # ... end end

Upvotes: 0

Muhammad Haidar
Muhammad Haidar

Reputation: 2019

I had the same issue and I solved it by removing fonts.ttf files in Build Phases/Copy Bundle Resources. Also, delete all the duplicate files in CBR if you have any.

enter image description here

Upvotes: 7

Akib Shaikh
Akib Shaikh

Reputation: 67

Error simply says some Pods are duplicate, Check all pods carefully and delete duplicate pods👍🏻

Upvotes: 2

user15347579
user15347579

Reputation:

Multiple command produce is common error in React Native. Mostly due to Icons and fonts. So to fix this we need to remove items from copy bundle Resources in Xcode. Click to check image

Step 1. Open Xcode Steps 2. Check the errors. You will find that the count of errors are the same as counts of fonts in copy bundle resources. So remove fonts there and run the code in Xcode only.

Happy Learning.

Upvotes: 0

faraj shuaib
faraj shuaib

Reputation: 46

  1. Open your xCode
  2. select pod folder
  3. find or search React-Core.common-AccessibilityResources
  4. Remove it from pod

and finally rebuild your project.

Upvotes: 2

Edward Tshifaro
Edward Tshifaro

Reputation: 707

I was facing the same issue with react-native 0.64.1 and I managed to resolve the issue by switching build system to Legacy.

File > Workspace Settings > Build System > Legacy Build System

Upvotes: 0

sumanta.k
sumanta.k

Reputation: 527

In my case, it should be React-Core-AccessibilityResources And I have updated my pod file with below code:

use_flipper!({ 'Flipper' => '0.74.0' })
 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
end

then run pod install

Upvotes: 9

swati bohra
swati bohra

Reputation: 86

I am also facing the similar issue please try the below mention instruction to resolve your issue. It might help you.

Remove React-Core.common-AccessibilityResources from Xcode Pods folder. After doing this code execute pod install command in your project. Also clear the derived data before building

Upvotes: 7

Related Questions