react-native: xCode fails to build new react-native init project due to 'library not found for -lDoubleConversion'

I have initiated a new react-native app with the react-native cli (react-native init newproject). The build works if I then run react-native run-ios but if I open the project in xcode (via the .xcodeproj file in the ios folder) then the build fails due to ‘library not found for -lDoubleConversion’

image

React Native version: System: OS: macOS 10.14.5 CPU: (4) x64 Intel® Core™ i5-7360U CPU @ 2.30GHz Memory: 28.45 MB / 8.00 GB Shell: 5.3 - /bin/zsh Binaries: Node: 12.5.0 - /usr/local/bin/node Yarn: 1.16.0 - /usr/local/bin/yarn npm: 6.9.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2 IDEs: Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild npmPackages: react: 16.8.6 => 16.8.6 react-native: 0.60.0 => 0.60.0 npmGlobalPackages: react-native-cli: 2.0.1 react-native-log-ios: 1.0.1

Steps To Reproduce

  1. react-native init newproject
  2. open ios/newproject.xcodeproj in xcode and build

Describe what you expected to happen:

Build to fail with warning “library not found for -lDoubleConversion”

Snack, code example, or link to a repository:

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 5
  • Comments: 18

Most upvoted comments

Due to the fact that DoubleConversion is a third-party library, I think you should open your project with .xcworkspace rather than .xcodeproj.

@shannonjensen Look like your project never run the ‘pod install’ command.

Do the below steps

  1. go to ios/
  2. run ‘pod install’ or ‘pod update’
  3. open ios/newproject.xcworkspace

@shannonjensen Look like your project never run the ‘pod install’ command.

Do the below steps

  1. go to ios/
  2. run ‘pod install’ or ‘pod update’
  3. open ios/newproject.xcworkspace

This fixed my problem, Thank U. Can I know from when did pods became mandatory ?

I have the same problem when I try simulate on tv-ios with this error ld: library not found for -lPods-reactProject-tvOS

then I found this post when I create the project from his code it works https://github.com/danilvalov/react-native-appletv the app runs on tv-os perfect!

@danilvalov thanks

I had this problem. i resolve this problem is open the *.xcworkspace with xcode ,not the *.xcodepro. try it.