我正在开发一个两年前编写的应用程序,所以现在我正试图在Android和iOS上构建代码.当我从iOS文件夹中的vscode执行pod install,然后我在Xcode中构建iOS代码时,我将面对其中一个Pods项目下的101. 我的努力:

  1. 已清除 node 模块缓存或将其删除,然后重新安装.
  2. 我try 删除我的Pods目录,然后运行pod install我打开.xcworkspace,就像它在Pod安装时写在日志(log)中一样,我在Xcode上清理项目,然后try 构建,但它不起作用……
  3. 为所有Pod文件和项目设置相同的iOS构建目标.

以下是我的Pod文件:

    require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '11.0'

target 'MyAppName' do
  use_modular_headers!   // here i have also tried use_frameworks!
  pod 'RNPermissions', :path => '../node_modules/react-native-permissions'
  permissions_path = '../node_modules/react-native-permissions/ios'
  pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
  pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways"
  pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"
  pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"
  pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary"
  pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone"  

  # React Native Maps dependencies
  # pod 'react-native-google-maps', :path => '../node_modules/react-native-maps'
  rn_maps_path = '../node_modules/react-native-maps'
  pod 'react-native-google-maps', :path => rn_maps_path
  # pod 'GoogleMaps'
  # pod 'Google-Maps-iOS-Utils'

  #firebase
  pod 'Firebase/Core'
  pod 'Firebase/Messaging'
  

  use_react_native!(
    # :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )
  
  #pod 'RNFirebase', :path => '../node_modules/react-native-firebase'
  #pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'

  pod 'ReactNativeExceptionHandler', :path => '../node_modules/react-native-exception-handler'

  #pod 'react-native-maps', :path => '../node_modules/react-native-maps'
  pod 'react-native-maps', path: '../node_modules/react-native-maps'
  pod 'react-native-google-maps', path: '../node_modules/react-native-maps'
  pod 'GoogleMaps'
  pod 'Google-Maps-iOS-Utils'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'RNSVG', :path => '../node_modules/react-native-svg'

  target 'MyAppNameTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.

  post_install do |installer|
    react_native_post_install(installer)
  end
end

Cannot find protocol declaration for 'RCTInitializing'

Xcode版本:12.0(12A7209),

react :"17.0.1",

REACT-Native:"0.63.4",

如果还需要什么,请让我知道,并帮助我解决这个错误.

UPDATE

Cannot find protocol declaration for 'RCTInitializing'

推荐答案

对于这个问题,必须添加

Add pod 'React-logger', :path => '../node_modules/react-native/ReactCommon/logger'

ref

Ios相关问答推荐

如何创建自定义组件来接受(和传递)所有可能的Textfield参数?

在Android和iOS上从后台恢复应用程序后,inappwebview上出现白屏?

如何在SwiftUI ScrollView中zoom 中心项目?

Swift在SceneKit中为scnnode添加自定义几何体(视图)

如何将Safari调试器附加到Turbo-iOS原生应用中的模拟器

在嵌套的DISPATCH_AFTER块中正确使用strong自/弱自

如何使用参与者允许并行读取,但阻止对SWIFT中资源的并发读取和写入?

保存和读取登录到 keys 串不工作 IOS swift

如何解决错误 HE0004:无法在 Visual Studio 2022 中加载框架ContentDeliveryServices

如何使用 pushViewController 从 UIHostingController 的 SwiftUI 视图中推送 ViewController?

Flutter firebase_auth 中的无效应用程序凭据/令牌不匹配

搜索在 ios xamarin.forms 中不起作用

在 UITextView 中垂直居中文本

iOS 应用程序中的手动语言 Select (iPhone 和 iPad)

在滚动视图中使用动态大小的控制器调整容器视图的大小

应用程序不包含正确的测试版权利

Xcode / iOS模拟器:手动触发重大位置更改

由于 GoogleSignIn、AdMob 提交应用程序时 iOS 10 GM 发布错误应用程序try 在没有使用说明的情况下访问隐私敏感数据

如何在 iphone 屏幕中间显示活动指示器?

iPhone UITableView.如何开启音乐 App 之类的单字母字母列表?