4
votes

I create new project with react-native 0.60.4 version.

Run react-native run-ios is fine on Simulator.

But use Xcode build project will show warning and error .

I try to rm -rf node_modules && npm install and pod install , but build failed and same error message .

Xcode build failed message:

ld: warning: directory not found for option '-L/Users/username/Library/Developer/Xcode/DerivedData/test_rea-hdbyphuobutanveksnvnbgtevbhs/Build/Products/Debug-iphonesimulator/DoubleConversion' ld: warning: directory not found for option '-L/Users/username/Library/Developer/Xcode/DerivedData/test_rea-hdbyphuobutanveksnvnbgtevbhs/Build/Products/Debug-iphonesimulator/Folly' ld: warning: directory not found for option '-L/Users/username/Library/Developer/Xcode/DerivedData/test_rea-hdbyphuobutanveksnvnbgtevbhs/Build/Products/Debug-iphonesimulator/React-Core' ld: warning: directory not found for option '-L/Users/username/Library/Developer/Xcode/DerivedData/test_rea-hdbyphuobutanveksnvnbgtevbhs/Build/Products/Debug-iphonesimulator/React-DevSupport' ld: warning: directory not found for option '-L/Users/username/Library/Developer/Xcode/DerivedData/test_rea-hdbyphuobutanveksnvnbgtevbhs/Build/Products/Debug-iphonesimulator/React-RCTActionSheet' ld: warning: directory not found for option '-L/Users/username/Library/Developer/Xcode/DerivedData/test_rea-hdbyphuobutanveksnvnbgtevbhs/Build/Products/Debug-iphonesimulator/React-RCTAnimation' ..............

ld: library not found for -lDoubleConversion clang: error: linker command failed with exit code 1 (use -v to see invocation)

environment

System:
    OS: macOS High Sierra 10.13.6
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Memory: 2.96 GB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.5.0 - /usr/local/bin/node
    npm: 6.1.0 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
    Android SDK:
      API Levels: 23, 24, 25, 26, 27, 28, 29
      Build Tools: 27.0.3, 28.0.0, 28.0.3
      System Images: android-26 | Google APIs Intel x86 Atom_64, android-26 | Google Play Intel x86 Atom, android-27 | Google Play Intel x86 Atom
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5692245
    Xcode: 10.1/10B61 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.8.6 => 16.8.6 
    react-native: 0.60.4 => 0.60.4 
  npmGlobalPackages:
    react-native-cli: 2.0.1
    react-native-git-upgrade: 0.2.7
    react-native-rename: 2.4.1
1
I'm having the same issue. Did you have any luck?bgmaster

1 Answers

0
votes

You might be opening the .xcodeproj file of your React-Native.

As of React-Native 0.60, cocoapods is included by default, which means a .xcworkspace file is being created. This is essentially a collection of xcode projects, including your react-native project and the cocoapods library project.

The latter contains all (react-native) native dependencies. Whenever you open the .xcodeproj file, those dependencies are not included in the project and xcode does not know those files exist. This explains why the linker can't find them either.