本文介绍了我的本地人在构建tvOS时遇到问题,但iOS成功的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我点击了下面的链接以安装新的reactNative App ..





我也在此处添加我的Podfile,请提出任何更改建议

 #ReactNativeSample Pod的容器
platform:ios,'9.0'
require_relative'../node_mo dules / @ 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‘瑜伽’,: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

目标‘ReactNativeSampleTests’确实有
继承! :search_paths
#测试豆荚
结束

use_native_modules!
结束

目标'ReactNativeSample-tvOS'做
#ReactNativeSample-tvOS的豆荚
平台:tvos,'9.2'

全部

目标'ReactNativeSample-tvOSTests'做
继承! :search_paths
#测试豆荚
end

end```


解决方案

如果使用的是可可豆,而不要使用 .xcworkspace 文件,默认的 .xcodeproj 文件。


I followed the link below to install new reactNative App ..

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

After Successfully Installed I am able to run the iOS target but not tvOS while running tvOS I am getting below error ..

Library not found for -lPods-AwesomeProject-tvOS

It seems in podfile cocoapods not included for tvos target .. So I added cocoaPods for tvos target and then build again but getting below warning and errors..

I am also adding my Podfile here please suggest any changes

  # 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 ```

解决方案

Cause if you're using cocoapods and don't use the .xcworkspace file instead of the default .xcodeproj file.

这篇关于我的本地人在构建tvOS时遇到问题,但iOS成功的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 07:22