22

So there are a lot of questions like this already, but I'm having the same error, not relating to cocoapods or info.plist, at least I don't think, because none of the solutions worked for me.

I just recently upgraded to Xcode 10.0, and building my react native app gives this error:

Multiple commands produce '/Users/username/Library/Developer/Xcode/DerivedData/appname-code/Build/Products/Release-iphoneos/appname.app':
1) Target 'appname' has create directory command with output '/Users/username/Library/Developer/Xcode/DerivedData/appname-code/Build/Products/Release-iphoneos/appname.app'
2) That command depends on command in Target 'appname': script phase “[CP] Copy Pods Resources”

How do I fix this error?

1
  • Not sure, but I'd start with cleaning your derived data... delete /Users/username/Library/Developer/Xcode/DerivedData, then rebuild.
    – drewster
    Sep 22, 2018 at 0:42

4 Answers 4

18

I have resolved my issue in Xcode 10.2 through below steps:

change the build system to Legacy

File > Workspace Settings > Build System > Legacy Build System.

enter image description here

2
  • 1
    simplest solution
    – Anuj
    Jan 3, 2020 at 11:42
  • 2
    it worked, i had issue on Multiple commands produce error for /path... / .ttf file
    – Ajay S
    Apr 23, 2020 at 15:10
11

I fixed it by upgrading cocoapods to the latest version:

  1. Close Xcode project.
  2. Upgrade cocoapods to latest version - run "sudo gem install cocoapods"
  3. Follow steps here to remove existing pods
  4. Run "pod install" in the project directory
1
1

For those using React Native and Cocoapods

The issue was produced by some libRN...a files. I fixed it by removing some of them like libRNScreens.a and libRNGestureHandler.a from Build Phases -> Link Binary with Libraries since they were already being referenced from another libraries. Others had to be replaced by their Pod version like libRNDeviceInfo.a:

enter image description here enter image description here

1

My solution was in removing all that installer.pods_project.targets.each do |target| ... fixes from Podfile also I had pod 'React', :path => '... which I also removed. So my Podfile now looks like this

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '12.4'

target 'AppName' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    :hermes_enabled => false
  )

  use_flipper!()

  post_install do |installer|
    react_native_post_install(installer)
  end
end

Default react-native Podfile

I was migrating from react-native 0.59 to 0.64

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.