找不到“firebase_messaging/FirebaseMessagingPlugin.h”文件

2024-01-06

我正在尝试在 ios 上运行我的 flutter 应用程序,但是我收到此错误

/ios/Runner/GeneratePluginRegistrant.m:6:9: 找不到“firebase_messaging/FirebaseMessagingPlugin.h”文件

这是我的 podfile 内容

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

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def parse_KV_file(file, separator='=')
  file_abs_path = File.expand_path(file)
  if !File.exists? file_abs_path
    return [];
  end
  pods_ary = []
  skip_line_start_symbols = ["#", "/"]
  File.foreach(file_abs_path) { |line|
      next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
      plugin = line.split(pattern=separator)
      if plugin.length == 2
        podname = plugin[0].strip()
        path = plugin[1].strip()
        podpath = File.expand_path("#{path}", file_abs_path)
        pods_ary.push({:name => podname, :path => podpath});
      else
        puts "Invalid plugin specification: #{line}"
      end
  }
  return pods_ary
end

target 'Runner' do
  use_frameworks!
  # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
  # referring to absolute paths on developers' machines.
  system('rm -rf .symlinks')
  system('mkdir -p .symlinks/plugins')

  # Flutter Pods
  generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
  if generated_xcode_build_settings.empty?
    puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first."
  end
  generated_xcode_build_settings.map { |p|
    if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
      symlink = File.join('.symlinks', 'flutter')
      File.symlink(File.dirname(p[:path]), symlink)
      pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
    end
  }

  # Plugin Pods
  plugin_pods = parse_KV_file('../.flutter-plugins')
  plugin_pods.map { |p|
    symlink = File.join('.symlinks', 'plugins', p[:name])
    File.symlink(p[:path], symlink)
    pod p[:name], :path => File.join(symlink, 'ios')
  }
end

# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
install! 'cocoapods', :disable_input_output_paths => true

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
      config.build_settings['SWIFT_VERSION'] = '4.1'
    end
  end
end

这是我跑步时的结果pod install

分析依赖关系 获取 podspecFlutter from .symlinks/flutter/ios-release正在获取 podspecfirebase_messaging from .symlinks/plugins/firebase_messaging/ios正在获取 podspecgeolocator from .symlinks/plugins/geolocator/ios正在获取 podspecgoogle_api_availability from .symlinks/plugins/google_api_availability/ios正在获取 podspecimage_cropper from .symlinks/plugins/image_cropper/ios抓取 podspec 为image_picker from .symlinks/plugins/image_picker/ios正在获取 podspecpackage_info from .symlinks/plugins/package_info/ios正在获取 podspecpath_provider from .symlinks/plugins/path_provider/ios抓取 podspec 为permission_handler from .symlinks/plugins/permission_handler/ios正在获取 podspecshared_preferences from .symlinks/plugins/shared_preferences/ios正在获取 podspecsqflite from .symlinks/plugins/sqflite/ios正在获取 podspecwebview_flutter from .symlinks/plugins/webview_flutter/ios下载依赖项 使用 FMDB (2.7.5) 使用 Firebase (6.7.0) 使用 FirebaseAnalytics (6.1.1) 使用 FirebaseAnalyticsInterop (1.4.0) 使用 FirebaseCore (6.2.1) 使用 FirebaseCoreDiagnostics (1.0.1) 使用 FirebaseCoreDiagnosticsInterop (1.0.0) 使用 FirebaseInstanceID (4.2.3) 使用 FirebaseMessaging (4.1.3) 使用 Flutter (1.0.0) 使用 GoogleAppMeasurement (6.1.1) 使用 GoogleDataTransport (1.1.3) 使用 GoogleDataTransportCCTSupport (1.0.2) 使用 GoogleUtilities (6.2.5) 使用 Protobuf (3.9.0) 使用 TOCropViewController (2.5.1) 使用 firebase_messaging (0.0.1) 使用地理定位器 (3.0.1) 使用 google_api_availability (2.0.1) 使用 image_cropper (0.0.1) 使用 image_picker (0.0.1) 使用nanopb (0.3.901) 使用package_info (0.0.1) 使用path_provider (0.0.1) 使用permission_handler (3.2.2) 使用 share_preferences (0.0.1) 使用 sqflite (0.0.1) 使用 webview_flutter (0.0.1)生成Pods项目集成客户端项目Pod 安装完成! Podfile 有 12 个依赖项 总共安装了 28 个 Pod。

我的Xcode版本是10.0

我该如何解决它?提前致谢


如有疑问,我只是擦除并重新安装,而不是手动处理级联依赖项。

1) rm your ios/Pods dir和 Podfile.lock 文件(当然要备份)

2) rm your ~/.pub-cache/hosted/pub.dartlang.org/

3) flutter clean

4) flutter packages get

5) pod repo update

6) 像平常一样运行 flutter 可执行文件(调用 pod install),或者手动运行pod install.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

找不到“firebase_messaging/FirebaseMessagingPlugin.h”文件 的相关文章

  • SwiftUI:状态栏颜色

    有没有办法将 SwiftUI 视图的状态栏更改为白色 我可能错过了一些简单的东西 但我似乎找不到在 SwiftUI 中将状态栏更改为白色的方法 到目前为止我只看到 statusBar hidden Bool 状态栏文本 色调 前景色可以通过
  • Swift Codable 将空 json 解码为 nil 或空对象

    这是我的代码 class LoginUserResponse Codable var result String var data LoginUserResponseData var mess String public class Log
  • 为什么我不能在 Realm 属性上使用 private

    我正在尝试在 RealmSwift 中存储一个枚举案例 但 Realm 不支持枚举 本文 https medium com it works locally persisting swift enumerations with realm
  • 如何防止Apple Watch进入睡眠状态?

    我们正在开发一个 Apple Watch 项目 但如果不被打扰 手表就会进入睡眠状态 有什么办法可以阻止它进入睡眠状态吗 据我所知和有关该主题的其他搜索 目前还没有api可通过编程方式启用或禁用 Apple Watch 的睡眠模式
  • iPhone UINavigationBar 使用 [UINavigationBar 外观] 更改所有控制器的字体样式

    我知道我可以单独更改导航栏的字体 如本答案所述 更改导航栏的字体 https stackoverflow com questions 5832036 change the navigation bars font 目前我正在使用一种更全局的
  • 如何解决 CoreData mogenerator 未找到问题

    我收到如下所示的错误 我不知道我错过了什么 我该如何解决这个问题 如下图所示 Users nischalhada Documents XcodePro mnepalnews revisited 2 0 CoreData mogenerato
  • 如何将字符串日期转换为 NSDate?

    我想转换字符串 2014 07 15 06 55 14 198000 00 00 to an NSDate在斯威夫特 尝试这个 let dateFormatter NSDateFormatter dateFormatter dateForm
  • 在iOS上,“添加到主页”缓存保存在哪里,如何清除它?

    我正在 iPad iOS v7 上制作一个 html5 游戏 当我将其添加到主页时 它非常顽固地释放缓存 如果我在 Safari 中查看它 这会按照您所期望的方式工作 如果我刷新一次或两次 页面就会以最新状态缓存 但在主页上却是另一回事 它
  • iOS 滚动视图允许滚动过去的内容

    我正在努力优化我的应用程序以适应横向和较小的屏幕 我主要使用滚动视图来实现这一点 在我的其中一个视图中 我有一个容器视图 当我在故事板中的设备之间切换时 这个容器视图看起来很完美 容器视图映射到具有滚动视图的视图控制器 该滚动视图的顶部 底
  • iOS 中的构建对象文件扩展名是什么?

    当我在项目中构建java对象类时 将创建带有 class扩展名的构建文件 并且人类不可读 快速构建文件怎么样 example car java gt build gt car class 构建后会是什么 car swift gt build
  • iOS:提高图像绘制速度

    我有一系列想要制作动画的图像 UIImageView支持一些基本的动画 但不足以满足我的需求 我的第一个方法是使用UIImageView并设置image当图像属性 这太慢了 速度慢的原因是图像的绘制 这让我感到惊讶 我以为瓶颈会加载图像 我
  • 架构armv7的重复符号

    尝试在我现有的应用程序中使用 Layar SDK 时出现以下错误 我该如何解决这个问题 Ld Users pnawale Library Developer Xcode DerivedData hub afxxzaqisdfliwbzxbi
  • UICollectionView 拖放文件夹创建

    我正在使用 UICollectionView 创建 iOS 画廊应用程序 我希望用户能够拖放图像来重新排序图库并创建文件夹 类似于 iPhone 上的主屏幕 我发现了以下内容tutorial http nshint io blog 2015
  • iphone:如何停止快门动画?

    我有两个问题 1 我想知道如何在相机加载时停止快门动画 我正在使用 UIImagePickerController 我已经参考了堆栈溢出的许多答案 但没有成功 2 我在相机中有一个自定义按钮 使用cameraOverlayView并想通过单
  • NVActivityIndi​​catorView 仅适用于特定视图

    我正在使用这个库https github com ninjaprox NVActivityIndi catorView https github com ninjaprox NVActivityIndicatorView用于显示加载指示器
  • 指定访问组时出现 KeychainItemWrapper 错误

    相当长一段时间以来 我一直在使用 KeychainItemWrapper 的 ARC 版本成功读取和写入私有钥匙串项目 我现在正在努力将我的 iOS 应用程序转换为使用共享访问组 以便我的 2 个共享相同应用程序前缀的应用程序可以访问钥匙串
  • WhatsApp 显示警告“此项目无法共享。请选择其他项目。”对于 iOS 应用程序。

    我正在开发一个 iOS 应用程序 在该应用程序中 我有社交共享功能 并且社交共享功能使用深度链接来共享 URL 该网址共享对于所有应用程序都运行良好 除了WhatsApp 它会显示一个警报弹出窗口 此项目无法共享 请选择其他项目 以下是我的
  • 如何反转 CGPath 的点顺序

    我想画一个圆圈 并用它打出字母 为此 我需要顺时针抚摸圆圈 逆时针抚摸字母 这一切都很好 但是当我使用 Core Text 获取字母路径时 我不知道如何从本质上反转该路径 不是镜像或旋转或任何东西 这很简单 我希望点笔画顺序是逆时针的 这实
  • Swift C 回调 - Swift 类指针的 takeUnretainedValue 或 takeRetainedValue

    我有一些UIView or UITableViewCell 里面我有 C 回调 例如 CCallback bridge self observer data gt Void in let mySelf Unmanaged
  • 为什么使用 iPhone 或 iOS 设备在“iframe”中查看“position:fixed”时不起作用?

    我研究过 stackoverflow 似乎position fixed在 iOS 移动设备的 iframe 中 https stackoverflow com questions 15874910 position fixed and if

随机推荐