使用 React-native init,无法在 Xcode 中构建新的 iOS 应用程序,构建错误 'ld: 找不到 -lDoubleConversion 的库

using React-native init, a new iOS app can't build in Xcode, build error 'ld: library not found for -lDoubleConversion

重现步骤:

react-native init FirstProject cd FirstProject open ios/FirstProject.xcodeproj

...Xcode 打开项目:

I select 构建目标 iOS 模拟器 -> Iphone XR

终端 window 在后台打开:

但是,Xcode returns 构建错误:

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

此处显示警告 https://gist.github.com/jasonfb/7b51a260df419590c6fadda93fb49348

您应该打开工作区,而不是按照项目创建脚本末尾的说明所示的项目文件:

    • cd "/Users/xxx/FirstProject" && npx react-native run-ios
    - or -
    • Open FirstProject/ios/FirstProject.xcworkspace in Xcode or run "xed -b ios"
    • Hit the Run button```