我正在尝试在 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
我该如何解决它?提前致谢