ios - 我的本地人在构建tvOS时遇到问题,但iOS成功

标签 ios reactjs react-native cocoapods tvos

我按照下面的链接安装了新的reactNative App ..

https://facebook.github.io/react-native/docs/getting-started

成功安装后,我可以在运行tvOS的同时运行iOS目标,但不能运行tvOS,但出现以下错误..

找不到-lPods-AwesomeProject-tvOS的库

似乎在tvos目标中未包含podcococoapods ..所以我为tvos目标添加了cocoaPods,然后再次构建,但低于警告和错误。

enter image description here

我也在这里添加我的Podfile,请提出任何建议

  # Pods for ReactNativeSample
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/'
  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
  pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
  pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'

  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
  pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  target 'ReactNativeSampleTests' do
    inherit! :search_paths
    # Pods for testing
  end

  use_native_modules!
end

target 'ReactNativeSample-tvOS' do
  # Pods for ReactNativeSample-tvOS
platform :tvos, '9.2'

All same pods in above target included here as well..

  target 'ReactNativeSample-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

end ```

最佳答案

原因是如果您使用的是椰壳而不是使用.xcworkspace文件而不是默认的.xcodeproj文件。

关于ios - 我的本地人在构建tvOS时遇到问题,但iOS成功,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58940703/

相关文章:

ios - 如何将日期合并到字典中?

reactjs - 将对象替换为 React 状态下的另一个对象

reactjs - 引用错误 : Property 'Proxy' doesn't exist

react-native - react native 错误 : Raw "" must be wrapped in an explicit <Text> Component

ios - 在 Swift 中以编程方式创建联系人

ios - 检查 Uitextview 中的负值?

javascript - 初学者困惑: Four Quadrant Selection Grid in a Pop-Up Form Using Material UI & React

javascript - 带有嵌套对象的 TextField onChange

android - 如何更改起始 Intent React Native

ios - UITextView滚动时 float 蓝框