简体   繁体   English

无法使用 Xcode 13 在 React Native projet 上运行 pod install

[英]impossible to run pod install on React native projet with Xcode 13

an error occurs when I run pod install on my React-native projet.当我在 React-native 项目上运行 pod install 时发生错误。

I upgraded to Xcode 13.1 to build my app for iOS 15.我升级到 Xcode 13.1 以构建适用于 iOS 15 的应用程序。

I posted an issue on cocoapods github, and they told me it's a react-native problem.我在 cocoapods github 上发布了一个问题,他们告诉我这是一个 react-native 问题。

Any Idea ?任何的想法 ?

I have this message on my terminal :我的终端上有这条消息:

Error
URI::InvalidURIError - bad URI(is not URI?): "/Users/sroques/Dropbox/INFOPROGIS/Clients/new tecnilud/appli-tecnilud/node_modules/react-native/third-party-podspecs/Folly.podspec"
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/uri/rfc3986_parser.rb:67:in `split'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/uri/rfc3986_parser.rb:73:in `parse'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/uri/common.rb:234:in `parse'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open-uri.rb:141:in `open_uri'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/external_sources/podspec_source.rb:19:in `block in fetch'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:86:in `titled_section'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/external_sources/podspec_source.rb:11:in `fetch'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:993:in `fetch_external_source'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:972:in `block (2 levels) in fetch_external_sources'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:971:in `each'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:971:in `block in fetch_external_sources'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:970:in `fetch_external_sources'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:117:in `analyze'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:416:in `analyze'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:161:in `install!'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/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.11.2_1/libexec/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in `load'
/usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in `<main>'
   Command
    /usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod install
    
    Stack
       CocoaPods : 1.11.2
            Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]
        RubyGems : 3.0.3
            Host : macOS 11.6.1 (20G224)
           Xcode : 13.1 (13A1030d)
             Git : git version 2.18.0
    Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
    Repositories : trunk - CDN - https://cdn.cocoapods.org/
    Plugins
    cocoapods-deintegrate : 1.0.5
    cocoapods-plugins     : 1.0.0
    cocoapods-search      : 1.0.1
    cocoapods-stats       : 1.1.0
    cocoapods-trunk       : 1.6.0
    cocoapods-try         : 1.2.0
    Podfile
    platform :ios, '10.0'
    require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
    require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
    
    def add_flipper_pods!(versions = {})
      #versions['Flipper'] ||= '~> 0.33.1'
      versions['Flipper'] ||= '~> 0.87.0'
      versions['DoubleConversion'] ||= '1.1.7'
      #versions['Flipper-Folly'] ||= '~> 2.1'
      versions['Flipper-Folly'] ||= '~>2.5.3'
      versions['Flipper-Glog'] ||= '0.3.6'
      versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
      #versions['Flipper-RSocket'] ||= '~> 1.0'
      versions['Flipper-RSocket'] ||= '~> 1.3.1'
    
      pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug'
      pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug'
      pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
      pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug'
      pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug'
    
      # List all transitive dependencies for FlipperKit pods
      # to avoid them being linked in Release builds
      pod 'Flipper', versions['Flipper'], :configuration => 'Debug'
      pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug'
      pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug'
      pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug'
      pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug'
      pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug'
      pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug'
      pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug'
      pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug'
      pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug'
      pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug'
      pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug'
      pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug'
      pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
    end
    
    # Post Install processing for Flipper
    def flipper_post_install(installer)
      installer.pods_project.targets.each do |target|
        if target.name == 'YogaKit'
          target.build_configurations.each do |config|
            config.build_settings['SWIFT_VERSION'] = '4.1'
          end
        end
      end
    end
    
    target 'Tecniludreporter' do
      # Pods for Tecniludreporter
      pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
      #pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
      pod 'FBReactNativeSpec', :path => "../node_modules/react-native/React/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/callinvoker', :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', :modular_headers => true
    
      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'
    
      use_unimodules!
      use_native_modules!
    
      # Enables Flipper.
      #
      # Note that if you have use_frameworks! enabled, Flipper will not work and
      # you should disable these next few lines.
      add_flipper_pods!
      post_install do |installer|
        flipper_post_install(installer)
      end
    end

Sorry for the poor description.抱歉,描述不佳。

I tried to begin from scratch :我试图从头开始:

git clone myProject git 克隆我的项目

npm install安装

cd ios pod install cd ios pod 安装

Try to archive with Xcode 13.1 (13A1030d)尝试使用 Xcode 13.1 (13A1030d) 存档

I got this error : /Users/sroques/Dropbox/INFOPROGIS/Clients/new tecnilud/appli-tecnilud/ios/Pods/Pods.xcodeproj The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99.我收到此错误:/Users/sroques/Dropbox/INFOPROGIS/Clients/new tecnilud/appli-tecnilud/ios/Pods/Pods.xcodeproj iOS 部署目标“IPHONEOS_DEPLOYMENT_TARGET”设置为 8.0,但支持的部署目标版本范围是 9.0 到 15.0.99。

I change iOS deployment target to 9.0 and try to archive again我将 iOS 部署目标更改为 9.0 并尝试再次存档

I got this error : xxx/ios/Pods/Headers/Private/Flipper-Folly/folly/synchronization/DistributedMutex-inl.h:1051:5: 'atomic_notify_one' is unavailable我收到此错误:xxx/ios/Pods/Headers/Private/Flipper-Folly/folly/synchronization/DistributedMutex-inl.h:1051:5: 'atomic_notify_one' 不可用

I found this post : Xcode throws 'atomic_notify_one<unsigned long>' is unavailable我找到了这篇文章: Xcode throws 'atomic_notify_one<unsigned long>' is available

I cannot find use_flipper!({ 'Flipper' => '0.96.0', 'Flipper-Folly' => '~> 2.6', 'Flipper-RSocket' => '~> 1.4' }) ligne on my Podfile, but I tried to change this :我在我的 Podfile 上找不到 use_flipper!({ 'Flipper' => '0.96.0', 'Flipper-Folly' => '~> 2.6', 'Flipper-RSocket' => '~> 1.4' }) ligne,但我试图改变这一点:

def add_flipper_pods!(versions = {})
  versions['Flipper'] ||= '~> 0.33.1'
  versions['DoubleConversion'] ||= '1.1.7'
  versions['Flipper-Folly'] ||= '~> 2.1'
  versions['Flipper-Glog'] ||= '0.3.6'
  versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
  versions['Flipper-RSocket'] ||= '~> 1.0'

to that :对此:

def add_flipper_pods!(versions = {})
  versions['Flipper'] ||= '~> 0.96.0'
  versions['DoubleConversion'] ||= '1.1.7'
  versions['Flipper-Folly'] ||= '~> 2.6'
  versions['Flipper-Glog'] ||= '0.3.6'
  versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
  versions['Flipper-RSocket'] ||= '~> 1.4'

I tried to archive gain and I got this error : XXX/ios/Pods/Headers/Private/Flipper-Folly/folly/synchronization/DistributedMutex-inl.h:1051:5: 'atomic_notify_one' is unavailable我尝试存档增益,但出现此错误:XXX/ios/Pods/Headers/Private/Flipper-Folly/folly/synchronization/DistributedMutex-inl.h:1051:5: 'atomic_notify_one' is available

I deleted pods folder and Podfile.lock我删除了 pods 文件夹和 Podfile.lock

Tried pod install again再次尝试 pod install

Tried to archive again and I got 3 errors : XXX/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:331:34: Cannot initialize a parameter of type 'NSArray<id> *' with an rvalue of type 'NSArray *'再次尝试存档,我收到 3 个错误:XXX/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:331:34: 无法用类型为“NSArray”的右值初始化“NSArray<id> *”类型的参数*'

XXX/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:776:79: Cannot initialize a parameter of type 'NSArray *' with an lvalue of type 'NSArray<id> *__strong' XXX/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:776:79: 无法使用类型为“NSArray<id> *__strong”的左值初始化“NSArray *”类型的参数

XXX/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:827:69: Cannot initialize a parameter of type 'NSArray<id> *' with an lvalue of type 'NSArray *__strong' XXX/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:827:69: 无法使用类型为“NSArray *__strong”的左值初始化“NSArray<id> *”类型的参数

I found this post : https://developer.apple.com/forums/thread/679043?login=true&page=1#694098022我找到了这篇文章: https : //developer.apple.com/forums/thread/679043?login=true&page=1#694098022

I made changed proposed by Apple, but it doesn't resolve my problem.我进行了 Apple 提出的更改,但并没有解决我的问题。 Now, I have those errors as replied to Apple :现在,我收到了 Apple 回复的这些错误:

xxx/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:671:20: Incompatible pointer types assigning to 'NSArray *' from 'NSArray *' xxx/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:671:20: 不兼容的指针类型从 'NSArray *' 分配给 'NSArray *'

AND

xxx/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:673:20: Incompatible pointer types assigning to 'NSArray *' from 'NSArray *' xxx/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:673:20: 不兼容的指针类型从 'NSArray *' 分配给 'NSArray *'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM