我正在尝试使用 xcode 在 ios 设备上运行我的第一个 React-Native 应用程序并不断收到此错误:
ld: warning: directory not found for option '-L/Users/XXXX/Library/Developer/Xcode/DerivedData/nigh-hktjvygosupgnoaafsvgyowhzsqi/Build/Products/Debug-iphoneos/React'
ld: library not found for -lReact
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)
我假设原因与我的 Scheme 的构建目标列表中缺少 React 的事实有关。React 是列表中的第一个,所有复选框都被选中,但它显示的是 React(missing) 而不是 React:
如果我点击“+”按钮,React 不是一个选项。这是我的 podfile:
platform :ios, '10.0'
require_relative '../node_modules/react-native-unimodules/cocoapods'
target 'nigh' do
# Pods for nigh
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge',
'DevSupport',
'RCTActionSheet',
'RCTAnimation',
'RCTBlob',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText', …
Run Code Online (Sandbox Code Playgroud)