react-native: 'Multiple commands produce' error when building with new Xcode build system

Hello,

Environment:

React Native Environment Info:
    System OS: macOS High Sierra 10.13.6
    Binaries:
      Node: 8.11.3 - /usr/local/bin/node
      npm: 5.6.0 - /usr/local/bin/npm
    IDEs:
      Xcode: 10 Beta 3
    npmPackages:
      react: 16.4.1
      react-native: 0.56.0

Error:

I got the following error when I try to build the simple RN 0.56 application:

warning: Skipping duplicate build file in Compile Sources build phase: <PATH_TO_PROJECT>/node_modules/react-native/React/Modules/RCTRedBoxExtraDataViewController.m (in target 'React-tvOS')
...
warning: duplicate output file '<HOME>/Library/Developer/Xcode/DerivedData/ReactNativeSimple-dpupkkuvhsslwxgngxzqgwsrazap/Build/Intermediates.noindex/ArchiveIntermediates/ReactNativeSimple/BuildProductsPath/Release-iphoneos/include/React/RCTResizeMode.h' on task: PBXCp <PATH_TO_PROJECT>/node_modules/react-native/Libraries/Image/RCTResizeMode.h <HOME>/Library/Developer/Xcode/DerivedData/ReactNativeSimple-dpupkkuvhsslwxgngxzqgwsrazap/Build/Intermediates.noindex/ArchiveIntermediates/ReactNativeSimple/BuildProductsPath/Release-iphoneos/include/React/RCTResizeMode.h (in target 'React')
...
error: Multiple commands produce '<PbxCp <HOME>/Library/Developer/Xcode/DerivedData/ReactNativeSimple-dpupkkuvhsslwxgngxzqgwsrazap/Build/Intermediates.noindex/ArchiveIntermediates/ReactNativeSimple/BuildProductsPath/Release-iphoneos/include/React/RCTScrollableProtocol.h>':
1) Target 'React-tvOS' has copy command from '<PATH_TO_PROJECT>/node_modules/react-native/React/Views/ScrollView/RCTScrollableProtocol.h' to '<HOME>/Library/Developer/Xcode/DerivedData/ReactNativeSimple-dpupkkuvhsslwxgngxzqgwsrazap/Build/Intermediates.noindex/ArchiveIntermediates/ReactNativeSimple/BuildProductsPath/Release-iphoneos/include/React/RCTScrollableProtocol.h'
2) Target 'React' has copy command from '<PATH_TO_PROJECT>/node_modules/react-native/React/Views/ScrollView/RCTScrollableProtocol.h' to '<HOME>/Library/Developer/Xcode/DerivedData/ReactNativeSimple-dpupkkuvhsslwxgngxzqgwsrazap/Build/Intermediates.noindex/ArchiveIntermediates/ReactNativeSimple/BuildProductsPath/Release-iphoneos/include/React/RCTScrollableProtocol.h'
error: Multiple commands produce '<HOME>/Library/Developer/Xcode/DerivedData/ReactNativeSimple-dpupkkuvhsslwxgngxzqgwsrazap/Build/Intermediates.noindex/ArchiveIntermediates/ReactNativeSimple/BuildProductsPath/Release-iphoneos/include/double-conversion/fast-dtoa.h':
1) Target 'double-conversion-tvOS' has copy command from '<PATH_TO_PROJECT>/node_modules/react-native/third-party/double-conversion-1.1.5/src/fast-dtoa.h' to '<HOME>/Library/Developer/Xcode/DerivedData/ReactNativeSimple-dpupkkuvhsslwxgngxzqgwsrazap/Build/Intermediates.noindex/ArchiveIntermediates/ReactNativeSimple/BuildProductsPath/Release-iphoneos/include/double-conversion/fast-dtoa.h'
2) Target 'double-conversion' has copy command from '<PATH_TO_PROJECT>/node_modules/react-native/third-party/double-conversion-1.1.5/src/fast-dtoa.h' to '<HOME>/Library/Developer/Xcode/DerivedData/ReactNativeSimple-dpupkkuvhsslwxgngxzqgwsrazap/Build/Intermediates.noindex/ArchiveIntermediates/ReactNativeSimple/BuildProductsPath/Release-iphoneos/include/double-conversion/fast-dtoa.h'
...

Repro steps:

  • react-native init
  • xcodebuild -project <PATH_TO_PROJECT>/ios/ReactNativeSimple.xcodeproj -scheme ReactNativeSimple archive -sdk iphoneos -archivePath <PATH_TO_PROJECT>/output/build/archive/ReactNativeSimple CODE_SIGN_STYLE=Automatic

Details:

I tested it on the simple RN application that was created by “react-native init” command. When I try to build the app using Xcode 10 GUI - it builds successfully. But I try to build it using xcodebuild command - it failed with the error above.

When we use the same command on the same application (RN 0.56) in Xcode 9.4.1 - it builds successfully If I don’t specify -sdk param in xcodebuild command it builds successfully. Note: Errors may be different for the different Xcode 10 Beta versions.

Questions:

Does RN 0.56 support Xcode 10 Beta? How I can fix it? Is there workaround to build it using Xcode 10 Beta?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 24
  • Comments: 69 (11 by maintainers)

Commits related to this issue

Most upvoted comments

You can try to change the build system to Legacy, File > Workspace Settings > Build System > Legacy Build System.

I also had the Multiple commands produce error with libReact.a & libyoga.a. I’m using:

  • Xcode 10
  • react-native 0.57.0
  • CocoaPods

To overcome this, I have added this to my Podfile:

  post_install do |installer|
    installer.pods_project.targets.each do |target|

      # The following is needed to ensure the "archive" step works in XCode.
      # It removes React & Yoga from the Pods project, as it is already included in the main project.
      # Without this, you'd see errors when you archive like:
      # "Multiple commands produce ... libReact.a"
      # "Multiple commands produce ... libyoga.a"

      targets_to_ignore = %w(React yoga)
      
      if targets_to_ignore.include? target.name
        target.remove_from_project
      end

    end
  end

Then rebuild your Pods project with:

$ pod install

Full environment details:


  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
      Memory: 4.10 GB / 32.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.9.0 - ~/.nvm/versions/node/v10.9.0/bin/node
      Yarn: 1.9.4 - /usr/local/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v10.9.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
    IDEs:
      Xcode: 10.0/10A255 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.0 => 16.5.0
      react-native: 0.57.0 => 0.57.0
    npmGlobalPackages:
      create-react-native-app: 1.0.0
      react-native-cli: 2.0.1

We want to use new build system.

For me work removing duplicated resources in inside

Build Phases As example bellow, Fonts was making an error

image

Adding to @aerda’s answer, I removed all of the fonts (.tff files) used by react-native-vector-icons from Build Phases > Copy Bundle Resources and my project is now building.

I believe this error in my case was related to updating to XCode 11, but am not positive about that last part.

Confirmed @PaulMest’s workaround works. Manually deleting Yoga in Xcode, from the Pods project’s Targets should work too, as I’ve been doing with React which has been causing duplicate targets build errors as well, before RN 0.57.

If you are using xcodebuild, append this -UseModernBuildSystem=NO to opt into the old legacy build system

I ran into this as well with detox. I fixed it by specifying a destination in xcodebuild instead of the sdk: -destination 'platform=iOS Simulator,name=iPhone 7'

I confirm the same with fonts being duplicate, only after upgrade to Xcode 11 stable today (Mac 10.14.6). Removing fonts under the [CP] Copy Pods Resources section of Xcode’s Build Phases and build works again.

Was and is using New build system. On RN 0.60.5.

My Podfile post_install looked like this:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'react-native-google-maps'
      target.build_configurations.each do |config|
        config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
      end
    end
    if target.name == "React"
      target.remove_from_project
    end
    if target.name == 'yoga'
      target.remove_from_project
      target.build_configurations.each do |config|
          config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'NO'
          config.build_settings['GCC_WARN_64_TO_32_BIT_CONVERSION'] = 'NO'
      end
    end
  end
end

Following the suggestion from @PaulMest worked for me.

For me work removing duplicated resources in inside

Build Phases As example bellow, Fonts was making an error

image

I’ve been using the new build system since 58 with no issues.

I did have Multiple commands produce * issues like the above but this was due to leftovers from before I switched to Pods (linking); make sure you remove all React Native related Linked Frameworks and Libraries from your Xcode project (not the generated workspace) if you’re now using Pods.

After you’ve cleaned it up and switched to using RN via Pods it should look something like this:

image

And NOT like this: image

Note that the old build system ignored these duplications from trying to use RN via linking & pods together; the new build system does not; so you may have had these for some time.

If you’re building with xcodebuild e.g. for Detox make sure to apply @aaronjensen 's suggestion from above to your build command.

@ntomallen I’ve ran into the exact same issue with duplicate fonts from react-native-vector-icons and native-base and what I ended up doing was removing the duplicate from my target app’s Copy Resources To Bundle section. After this, my project worked again (well, it moved to two different errors, which are described here: libfishhook.a can not be found - fix and Multiple commands produce error with libReact.a & libyoga.a. - fix

So far, my app has been running fine & I can compile using XCode 10’s new build system.

Disclaimer: I am not an experienced iOS developer and hacked these solutions together. I do not know if I have messed something up I don’t know about.

@cpojer IMHO this isn’t solved if the solution requires manual steps after creating a simple project with react-native init. This is not what new users will expect. The default should just work without any changes in Xcode and without CocoaPods. (Although CocoaPods is great and works fine with RN 😏)

As explained before, I created a sample app with react-native init and run this on Travis CI. This shows well that the build works fine with Xcode 9 and Xcode 10 with the legacy build system. And it doesn’t work with the Xcode 10 new build system.

You can see the build history here on GitHub, the master is already 0.59.0-rc.1 and has still the same problem.

The build history for different branches is available on Travis CI (master is Xcode 9 and there are two branches for Xcode 10) and as GitHub Pull Request

As said. IMHO. 😏

same here with 0.61.0-rc.3 and xcode 11 11A420a mojave 10.14.6

@hramos I am running into it when I run a build with detox, not yarn ios. Here is my config for my iOS simulator:

{
	"configurations": {
		"ios.sim.debug": {
			"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/reactipay.app",
			"build": "xcodebuild -project ios/reactipay.xcodeproj -scheme reactipay -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
			"type": "ios.simulator",
			"name": "iPhone 6"
		},
		"android.emu.debug": {
			"binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk",
			"build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..",
			"type": "android.emulator",
			"name": "emulator-5554"
		}
	},
	"test-runner": "jest"
}

Specifically, if I run this: xcodebuild -project ios/reactipay.xcodeproj -scheme reactipay -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build it fails with the original error.

@Salakar Removing all the RCT* libraries from the Linked Frameworks and Libraries in Xcode project builds successfully in iOS but gives the Native module cannot be null error. And only after i add the libReact.a and other libRCT*.a libraries the build works. We are using Pods to manage other dependencies.

Below is how our Podfile looks,


# Global platform for your project
platform :ios, '9.0'
# Ingore all the warnings from the CocoaPods libraries.
inhibit_all_warnings!
plugin 'cocoapods-fix-react-native'

target 'RNMobile' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Basic Pods for RNMobile
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge',
    'DevSupport',
    # the following ones are the ones taken from "Libraries" in Xcode:
    'RCTAnimation',
    'RCTActionSheet',
    'RCTBlob',
    'RCTGeolocation',
    'RCTImage',
    'RCTLinkingIOS',
    'RCTNetwork',
    'RCTSettings',
    'RCTText',
    'RCTVibration',
    'RCTWebSocket'
  ]

  # the following dependencies are dependencies of React native itself.
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga/Yoga.podspec'
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/GLog.podspec'

  # Extra pods for WahedMobile
  pod 'AppCenter/Crashes', '~> 1.13.0'
  pod 'AppCenter/Analytics', '~> 1.13.0'
  pod 'AppCenterReactNativeShared', '~> 1.12.0'
  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
  pod 'lottie-react-native', :path => '../node_modules/lottie-react-native'
  pod 'lottie-ios', :path => '../node_modules/lottie-ios'
  pod 'RNAWSCognito', :path => '../node_modules/amazon-cognito-identity-js'
  pod 'TouchID', :path => '../node_modules/react-native-touch-id'
  pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'
  pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
  pod 'RNSVG', :path => '../node_modules/react-native-svg'
  pod 'react-native-camera', :path => '../node_modules/react-native-camera'

  pod 'CodePush', :path => '../node_modules/react-native-code-push'

  pod 'RNAnalytics', :path => '../node_modules/@segment/analytics-react-native'
  
  # Firebase Libs
  pod 'Firebase/Core', '~> 5.15.0'
  pod 'Firebase/Messaging', '~> 5.15.0'
  
  # Onfido Libs
  pod 'Onfido', '10.3.0', :configurations => ['Debug']
  pod 'Onfido-Release', '10.3.0', :configurations => ['Release']

  pod 'RNKeychain', :path => '../node_modules/react-native-keychain'

end

Also adding the libs in the Linked Frameworks and Libraries creates duplicate symbols errors in AppCenter.

@hramos Unfortunately not. For me the Xcode legacy build option is still required with 0.57.8 and also with the new 0.58.0-rc.3 (edit: also with 0.58.3).

To make this reproducible, I create a fresh new project and test it locally and with travis CI. I linked the original project below (but its just created with react-native init) and the successful and broken builds on travis. Maybe this helps? At least I could and will re-run this experiment when there is a new version available.

The new build system should be supported. We’re tracking any issues people run into with Xcode 10 or the new build system in this task: https://github.com/facebook/react-native/issues/19573

At a glance, it does not seem like your issue is covered by what we’ve fixed so far on master. I’ll add it to the list.

I also had the Multiple commands produce error with libReact.a & libyoga.a. I’m using:

  • Xcode 10
  • react-native 0.57.0
  • CocoaPods

To overcome this, I have added this to my Podfile:

  post_install do |installer|
    installer.pods_project.targets.each do |target|

      # The following is needed to ensure the "archive" step works in XCode.
      # It removes React & Yoga from the Pods project, as it is already included in the main project.
      # Without this, you'd see errors when you archive like:
      # "Multiple commands produce ... libReact.a"
      # "Multiple commands produce ... libyoga.a"

      targets_to_ignore = %w(React yoga)
      
      if targets_to_ignore.include? target.name
        target.remove_from_project
      end

    end
  end

Then rebuild your Pods project with:

$ pod install

Full environment details:


  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
      Memory: 4.10 GB / 32.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.9.0 - ~/.nvm/versions/node/v10.9.0/bin/node
      Yarn: 1.9.4 - /usr/local/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v10.9.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
    IDEs:
      Xcode: 10.0/10A255 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.0 => 16.5.0
      react-native: 0.57.0 => 0.57.0
    npmGlobalPackages:
      create-react-native-app: 1.0.0
      react-native-cli: 2.0.1

great work rm -rf Pods; pod install worked for me

Hopefully my situation can help you guys fix the issue!

Here is the full output:

:-1: Multiple commands produce '/Users/ntomallen/Library/Developer/Xcode/DerivedData/zonder-bkcoqubqbalyhffxhurxhkuivvms/Build/Products/Debug-iphonesimulator/zonder.app/Roboto.ttf':
1) Target 'zonder' (project 'zonder') has copy command from '/Users/ntomallen/source/zonder-mobile-app/node_modules/native-base/Fonts/Roboto.ttf' to '/Users/ntomallen/Library/Developer/Xcode/DerivedData/zonder-bkcoqubqbalyhffxhurxhkuivvms/Build/Products/Debug-iphonesimulator/zonder.app/Roboto.ttf'
2) Target 'zonder' (project 'zonder') has copy command from '/Users/ntomallen/source/zonder-mobile-app/src/Resources/Fonts/Roboto.ttf' to '/Users/ntomallen/Library/Developer/Xcode/DerivedData/zonder-bkcoqubqbalyhffxhurxhkuivvms/Build/Products/Debug-iphonesimulator/zonder.app/Roboto.ttf'

:-1: Multiple commands produce '/Users/ntomallen/Library/Developer/Xcode/DerivedData/zonder-bkcoqubqbalyhffxhurxhkuivvms/Build/Products/Debug-iphonesimulator/zonder.app/Zocial.ttf':
1) Target 'zonder' (project 'zonder') has copy command from '/Users/ntomallen/source/zonder-mobile-app/node_modules/native-base/Fonts/Zocial.ttf' to '/Users/ntomallen/Library/Developer/Xcode/DerivedData/zonder-bkcoqubqbalyhffxhurxhkuivvms/Build/Products/Debug-iphonesimulator/zonder.app/Zocial.ttf'
2) Target 'zonder' (project 'zonder') has copy command from '/Users/ntomallen/source/zonder-mobile-app/node_modules/react-native-vector-icons/Fonts/Zocial.ttf' to '/Users/ntomallen/Library/Developer/Xcode/DerivedData/zonder-bkcoqubqbalyhffxhurxhkuivvms/Build/Products/Debug-iphonesimulator/zonder.app/Zocial.ttf'

:-1: Multiple commands produce '/Users/ntomallen/Library/Developer/Xcode/DerivedData/zonder-bkcoqubqbalyhffxhurxhkuivvms/Build/Products/Debug-iphonesimulator/zonder.app/Ionicons.ttf':
1) Target 'zonder' (project 'zonder') has copy command from '/Users/ntomallen/source/zonder-mobile-app/node_modules/native-base/Fonts/Ionicons.ttf' to '/Users/ntomallen/Library/Developer/Xcode/DerivedData/zonder-bkcoqubqbalyhffxhurxhkuivvms/Build/Products/Debug-iphonesimulator/zonder.app/Ionicons.ttf'
2) Target 'zonder' (project 'zonder') has copy command from '/Users/ntomallen/source/zonder-mobile-app/node_modules/react-native-vector-icons/Fonts/Ionicons.ttf' to '/Users/ntomallen/Library/Developer/Xcode/DerivedData/zonder-bkcoqubqbalyhffxhurxhkuivvms/Build/Products/Debug-iphonesimulator/zonder.app/Ionicons.ttf'

Essentially, react-native-vector-icons and native-base both bundle the same font files. (And for some reason we also have one of them bundled ourselves; I’ll be sure to remove that one.) Before updating to Xcode 10 / Mojave, there was no issue. The only change was to update from Xcode 9 to Xcode 10.

In Xcode, right click all of the things which reference React Native(usually under Frameworks or Libraries in the sidebar), and choose to “remove references”. At the end of the process, make sure the Linked Libraries and Frameworks section doesn’t have references to React Native. Note that as you do this, your other 3rd party libraries which depend on React Native should be linked through Pods as well. (Most of the major ones support it, which is nice.)

But when I execute pod install command next time, this entries will appear again 😂️

Sure, what you have looks pretty much like what we’re using.

xcodebuild -project ios/AppName.xcodeproj -scheme AppName -configuration Debug -destination 'platform=iOS Simulator,name=iPhone 7' -derivedDataPath ios/build

@ntomallen Basically it’s because there is a new, “stricter” build system, and XCode 10 uses it by default whereas in XCode 9 you had to actively choose to use it rather than the “legacy” build system which we’ve all been using until now.

@fungilation the same with me (Xcode 11 - upgraded today, new build system and RN 0.60.5). I have to removed all font under Copy Bundle Resources and it works.

@MakhouT They do not conflict. In fact, if you have a look at the react-native-navigation repo you’ll see there is a podspec file. I’m using RNN with cocoapods in a project now.

Given @Salakar’s comment

It appears I did not clean up linked frameworks and libraries correctly when I switched to start using Pods. Can anyone provide more detail on the correct process go about removing those links?

@salakar Ive been doing the same with no issues. One thing to note is that if you manually linked a 3rd party Libray without pods, it may have trouble finding React Native. Basically try to switch everything to Pods.

I very confused with this error as it doesn’t seem consistent. if I run build command 10 time, it could eventually start working this is how looks mu e2e script

detox build -c ios.sim.releas ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release ||
 detox build -c ios.sim.release

where is detox build is

xcodebuild -project ios/deliverypoc.xcodeproj -scheme deliverypoc -configuration Release -sdk iphonesimulator -derivedDataPath ios/build

I can’t use legacy build system as it hangs on react build, and I don’t use Cocoa Pods. What other solutions could be? Shall I migrate my iOS to Cocoa? What implications it would bring?

I confirm the same with fonts being duplicate, only after upgrade to Xcode 11 stable today (Mac 10.14.6). Removing fonts under the [CP] Copy Pods Resources section of Xcode’s Build Phases and build works again.

Was and is using New build system. On RN 0.60.5.

For newbies like me: you need to edit the file <PROJECT_FOLDER>/ios/<PROJECT_NAME>.xcodeproj/project.pbxproj

Then comment out the font lines (files ending in .ttf) like this:

inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-drawer2/Pods-drawer2-resources.sh", // "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf", // "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf", // "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf", // "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Feather.ttf", // "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf", // "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf", // "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf", // "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf", // "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf", // "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Foundation.ttf", // "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf", // "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf", // "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf", // "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf", // "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf", // "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf", ); name = "[CP] Copy Pods Resources"; outputPaths = ( // "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AntDesign.ttf", // "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Entypo.ttf", // "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EvilIcons.ttf", // "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Feather.ttf", // "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome.ttf", // "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Brands.ttf", // "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Regular.ttf", // "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Solid.ttf", // "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Fontisto.ttf", // "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Foundation.ttf", // "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Ionicons.ttf", // "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialCommunityIcons.ttf", // "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialIcons.ttf", // "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Octicons.ttf", // "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf", // "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf", );

And I had to redo this process every time I ran pod install

this is what I added to my podfile:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == "React"
      target.remove_from_project
    end
    
    if target.name == "yoga"
      target.remove_from_project
    end
  end

  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['DEBUG_INFORMATION_FORMAT'] = 'dwarf'
    end
  end
end

delete previous pods install pod then run update pod it will work.

My Podfile post_install looked like this:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'react-native-google-maps'
      target.build_configurations.each do |config|
        config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
      end
    end
    if target.name == "React"
      target.remove_from_project
    end
    if target.name == 'yoga'
      target.remove_from_project
      target.build_configurations.each do |config|
          config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'NO'
          config.build_settings['GCC_WARN_64_TO_32_BIT_CONVERSION'] = 'NO'
      end
    end
  end
end

Following the suggestion from @PaulMest worked for me.

your solution worked for me, tanks.

@jerolimov your build is not specifying a destination, which appears to be essential as it otherwise attempts to build artifacts for both tvOS and iOS, which causes the issue you’re seeing.

What isn’t clear is if there’s something that RN can be doing that could cause the new build system to know which you want implicitly or if this is actually just a bug in xcode (in which case this is the wrong repo for the issue).

I have no issue generally with Xcode since 0.57.8

-UseModernBuildSystem=NO

This works for me. Man it took me too long to find this. Thanks.

You have to be more specific. Xcode 10 builds and archives fine for me (after solving some errors I don’t remember now), on MacOS 10.12.6 and RN 0.57.0.

Xcode 10.1 Seems to be building fine on both systems but I can’t archive on either, many build errors. What to do now?