【发布时间】:2021-07-04 04:57:03
【问题描述】:
我想实现 firebase,为此我必须更新 pod。但是,当我在控制台中键入 pod repo update 时,它什么也不做……它只显示我的“更新规范 repo 'trunk'”,然后显示我的提示。如果我在控制台中输入 pod install ,它会显示:
[!] 无效的 `Podfile` 文件:/Users/tlobry/Desktop/Flutter/Generated.xcconfig 必须存在。如果您手动运行 pod install,请确保首先执行 flutter pub get。 # 来自 /Users/tlobry/Desktop/Podfile:16 # ------------------------------------------- # 除非 File.exist?(generated_xcode_build_settings_path) > raise "#{generated_xcode_build_settings_path} 必须存在。如果您手动运行 pod install,请确保首先执行 flutter pub get" # 结尾 # -------------------------------------------这是我的 pubspec.yaml:
name: flash_chat
description: A new Flutter application.
version: 1.0.0+1
environment:
sdk: ">=2.1.0<3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.2
animated_text_kit: ^4.1.1
firebase_core: ^1.0.3
firebase_auth: ^1.0.2
cloud_firestore: ^1.0.4
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
- images/
这是我的 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 flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
【问题讨论】:
标签: firebase flutter dart google-cloud-firestore