未找到React Native Navigation React / RCTRootView.h文件

时间:2018-03-31 11:48:21

标签: react-native react-native-ios react-native-navigation

enter image description here

我尝试使用React Native Navigation参考此说明 https://wix.github.io/react-native-navigation/#/installation-ios

当我链接libReactNativeNavigation.a Xcode显示错误并且我不知道如何解决这个问题时,我坚持第3步!

这是我的package.json

"dependencies": {
    "react": "~16.2.0",
    "react-native": "~0.51.0",
    "react-native-navigation" : "1.1.428"

  }

我的Pod文件

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '10.0'

target 'MyApp' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for React
  pod 'React', :path => '../js/node_modules/react-native', :subspecs => [
  'Core',
  'CxxBridge', # Include this for RN >= 0.47
  'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
  'RCTImage',
  'RCTNetwork',
  'RCTText',
  'RCTWebSocket',
]
   # Explicitly include Yoga if you are using RN >= 0.42.0
  pod "yoga", :path => "../js/node_modules/react-native/ReactCommon/yoga"

  # Third party deps podspec link
  pod 'DoubleConversion', :podspec => '../js/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'GLog', :podspec => '../js/node_modules/react-native/third-party-podspecs/GLog.podspec'
  pod 'Folly', :podspec => '../js/node_modules/react-native/third-party-podspecs/Folly.podspec'

1 个答案:

答案 0 :(得分:0)

这是因为React-Native-Navigation是您项目的子项目,并且它与React有依赖关系,而您通过cocoapods将其添加到项目中。

尝试将${BUILT_PRODUCTS_DIR} 递归添加到 Build Settings -> ReactNativeNavigation.xcodeproj

中的FRAMEWORK_SEARCH_PATHS