1

我正在尝试将 react native 应用程序从 0.59 更新到 0.64,它在 0.59 中,它允许进行 pod 安装。

当我使用 0.59 版本执行 pod install 时的结果

local@test xcode % pod deintegrate Deintegrating test.xcodeproj Deleted 1 'Copy Pods Resources' 构建阶段。删除了 1 个“检查 Pods Manifest.lock”构建阶段。删除了 1 个“嵌入 Pods 框架”构建阶段。

  • Pods_test.framework 已删除 1 个“检查 Pods Manifest.lock”构建阶段。删除了 1 个“嵌入 Pods 框架”构建阶段。
  • Pods_AppTests.framework
  • Pods-AppTests.debug.xcconfig
  • Pods-AppTests.debug integrado.xcconfig
  • Pods-AppTests.debug homolog.xcconfig
  • Pods-AppTests.debug prod.xcconfig
  • Pods-AppTests.release.xcconfig 从项目中删除 Pod 文件引用
  • Pods-App.debug.xcconfig
  • Pods-App.debug integrado.xcconfig
  • Pods-App.debug test.xcconfig
  • Pods-App.debug prod.xcconfig
  • Pods-App.release.xcconfig 删除Pods目录。

项目已解体。项目中没有留下任何 CocoaPods 的痕迹。注意:引用 Pods 项目的工作空间仍然存在。本地@test xcode %

吊舱安装

local@test ios % pod install 为目标自动链接 React Native 模块test_app:BVLinearGradient、RNDeviceInfo、RNFS、RNGestureHandler、RNPermissions、RNReanimated、RNScreens、react-native-adjust、react-native-dynatrace、react-native-safe-area- context 和 react-native-webview 分析依赖关系 下载依赖关系 生成 Pods 项目

集成客户端项目 Pod 安装完成!Podfile 中有 60 个依赖项,总共安装了 52 个 pod。

[!] 您的项目没有明确指定 CocoaPods 主规范 repo。由于 CDN 现在被用作默认设置,因此您可以通过pod repo remove master. 要禁止此警告,请添加warn_for_unused_master_specs_repo => false到您的 Podfile。

现在 0.64 版本生成下一个

吊舱安装

local@test xcode % pod install 分析依赖关系 获取 podspec for Follyfrom./Libraries/react-native/third-party-podspecs/Folly.podspec

――― MARKDOWN 模板 ――――――――――――――――――――――――――――――――――――――――――― ――――――――――――――</p>

命令

/usr/local/Cellar/cocoapods/1.10.1_1/libexec/bin/pod install

报告

  • 你做了什么?

  • 你期望会发生什么?

  • 反而发生了什么?

   CocoaPods : 1.10.1
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
    RubyGems : 3.0.3
        Host : Mac OS X 10.15.7 (19H15)
       Xcode : 12.2 (12B45b)
         Git : git version 2.24.3 (Apple Git-128)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : cocoapods - git - https://github.com/CocoaPods/Specs.git @ 3d73ef307c2c254ec6e2548eacc35d461958bfa0

               test.local-framework-pod-specs - git - http://test.local/framework/pod-specs.git @ 56f9f70f6160741426743b240f58847c105d6c78

               trunk - CDN - https://cdn.cocoapods.org/

插件

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.5.0
cocoapods-try         : 1.2.0

错误

Errno::ENOENT - No such file or directory @ rb_sysopen -
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open-uri.rb:37:in `initialize'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open-uri.rb:37:in `open'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open-uri.rb:37:in `open'
/usr/local/Cellar/cocoapods/1.10.1_1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/external_sources/podspec_source.rb:19:in `block in fetch'
/usr/local/Cellar/cocoapods/1.10.1_1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:86:in `titled_section'
/usr/local/Cellar/cocoapods/1.10.1_1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/external_sources/podspec_source.rb:11:in `fetch'
/usr/local/Cellar/cocoapods/1.10.1_1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:989:in `fetch_external_source'
/usr/local/Cellar/cocoapods/1.10.1_1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:968:in `block (2 levels) in fetch_external_sources'
/usr/local/Cellar/cocoapods/1.10.1_1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:967:in `each'
/usr/local/Cellar/cocoapods/1.10.1_1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:967:in `block in fetch_external_sources'
/usr/local/Cellar/cocoapods/1.10.1_1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/Cellar/cocoapods/1.10.1_1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:966:in `fetch_external_sources'
/usr/local/Cellar/cocoapods/1.10.1_1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:117:in `analyze'
/usr/local/Cellar/cocoapods/1.10.1_1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:414:in `analyze'
/usr/local/Cellar/cocoapods/1.10.1_1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
/usr/local/Cellar/cocoapods/1.10.1_1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/Cellar/cocoapods/1.10.1_1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
/usr/local/Cellar/cocoapods/1.10.1_1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in `install!'
/usr/local/Cellar/cocoapods/1.10.1_1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/usr/local/Cellar/cocoapods/1.10.1_1/libexec/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/usr/local/Cellar/cocoapods/1.10.1_1/libexec/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/usr/local/Cellar/cocoapods/1.10.1_1/libexec/bin/pod:23:in `load'
/usr/local/Cellar/cocoapods/1.10.1_1/libexec/bin/pod:23:in `<main>'

―――模板结束 ――――――――――――――――――――――――――――――――――――――――――― ――――――――――――――――――――</p>

[!] 哦不,发生了错误。

搜索与您类似的现有 GitHub 问题: https ://github.com/CocoaPods/CocoaPods/search?q=No+such+file+or+directory+%40+rb_sysopen+-

如果不存在,请使用上面显示的模板在以下位置创建票证: https ://github.com/CocoaPods/CocoaPods/issues/new

请务必先阅读贡献指南,了解如何正确提交工单的详细信息: https ://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

不要忘记匿名任何私人数据!

在 cocoapods/cocoapods 上寻找相关问题... 没有发现类似问题。要创建新问题,请访问: https ://github.com/cocoapods/cocoapods/issues/new

播客文件

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'Test' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Test
  pod 'CardIO' #5.4.1 version
  # dependences base react
  pod 'React', :path => './Libraries/react-native', :subspecs => [
    'Core',
    'CxxBridge', # Include this for RN >= 0.47
    'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
    'RCTText',
    'RCTImage',
    'RCTNetwork',
    'RCTWebSocket',
    'RCTLinkingIOS',
    'RCTAnimation',
    # needed for debugging
  # Add any other subspecs you want to use in your project
  ]
  pod 'yoga', :path => './Libraries/react-native/ReactCommon/yoga'
  pod 'DoubleConversion', :podspec => './Libraries/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => './Libraries/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => './Libraries/react-native/third-party-podspecs/Folly.podspec'
  # dependences react
  pod 'RNGestureHandler', :path => './Libraries/react-native-gesture-handler'
  pod 'BVLinearGradient', :path => './Libraries/react-native-linear-gradient'
  
  pod 'RNDeviceInfo', :path => './Libraries/react-native-device-info'
  pod 'RNFS', :path => './Libraries/react-native-fs'
  pod 'RNPermissions', :path => './Libraries/react-native-permissions'
  pod 'Permission-Camera', :path => './Libraries/react-native-permissions/ios/Camera.podspec'
  
  pod 'react-native-webview', :path => './Libraries/react-native-webview'
  # Adjust

  pod 'react-native-adjust', :path => './Libraries/react-native-adjust'
  target 'TestTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'TestUITests' do
    # Pods for testing
  end

end

项目

4

1 回答 1

2

我修复了错误。

如果有人有问题,你应该做下一个

在 0.59 版本中使用下

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

但它改变了下一个库

  # The prefix to react-native
  prefix =  "./Libraries/react-native"
  options={}
  
  # Include DevSupport dependency
  production = options[:production] ||= false

pod 'RCT-Folly', :podspec => "#{prefix}/third-party-podspecs/RCT- 
Folly.podspec"

播客文件

   The prefix to react-native
   prefix =  "./Libraries/react-native"
   options={}

    # dependences base react 
pod 'FBLazyVector', :path => "#{prefix}/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "#{prefix}/React/FBReactNativeSpec"
pod 'RCTRequired', :path => "#{prefix}/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "#{prefix}/Libraries/TypeSafety"
pod 'React', :path => "#{prefix}/"
pod 'React-Core', :path => "#{prefix}/"
pod 'React-CoreModules', :path => "#{prefix}/React/CoreModules"
pod 'React-RCTActionSheet', :path => "#{prefix}/Libraries/ActionSheetIOS"
pod 'React-RCTAnimation', :path => "#{prefix}/Libraries/NativeAnimation"
pod 'React-RCTBlob', :path => "#{prefix}/Libraries/Blob"
pod 'React-RCTImage', :path => "#{prefix}/Libraries/Image"
pod 'React-RCTLinking', :path => "#{prefix}/Libraries/LinkingIOS"
pod 'React-RCTNetwork', :path => "#{prefix}/Libraries/Network"
pod 'React-RCTSettings', :path => "#{prefix}/Libraries/Settings"
pod 'React-RCTText', :path => "#{prefix}/Libraries/Text"
pod 'React-RCTVibration', :path => "#{prefix}/Libraries/Vibration"
pod 'React-Core/RCTWebSocket', :path => "#{prefix}/"

unless production
  pod 'React-Core/DevSupport', :path => "#{prefix}/"
end

pod 'React-cxxreact', :path => "#{prefix}/ReactCommon/cxxreact"
pod 'React-jsi', :path => "#{prefix}/ReactCommon/jsi"
pod 'React-jsiexecutor', :path => "#{prefix}/ReactCommon/jsiexecutor"
pod 'React-jsinspector', :path => "#{prefix}/ReactCommon/jsinspector"
pod 'React-callinvoker', :path => "#{prefix}/ReactCommon/callinvoker"
pod 'React-runtimeexecutor', :path => "#{prefix}/ReactCommon/runtimeexecutor"
pod 'React-perflogger', :path => "#{prefix}/ReactCommon/reactperflogger"
pod 'ReactCommon/turbomodule/core', :path => "#{prefix}/ReactCommon"
pod 'Yoga', :path => "#{prefix}/ReactCommon/yoga", :modular_headers => true

pod 'DoubleConversion', :podspec => "#{prefix}/third-party-podspecs/DoubleConversion.podspec"
pod 'glog', :podspec => "#{prefix}/third-party-podspecs/glog.podspec"
pod 'RCT-Folly', :podspec => "#{prefix}/third-party-podspecs/RCT-Folly.podspec"

if fabric_enabled
  pod 'React-Fabric', :path => "#{prefix}/ReactCommon"
  pod 'React-graphics', :path => "#{prefix}/ReactCommon/react/renderer/graphics"
  pod 'React-jsi/Fabric', :path => "#{prefix}/ReactCommon/jsi"
  pod 'React-RCTFabric', :path => "#{prefix}/React"
  pod 'RCT-Folly/Fabric', :podspec => "#{prefix}/third-party-podspecs/RCT-Folly.podspec"
end

if hermes_enabled
  pod 'React-Core/Hermes', :path => "#{prefix}/"
  pod 'hermes-engine', '~> 0.7.2'
  pod 'libevent', '~> 2.1.12'
end
于 2021-06-29T16:46:47.530 回答