Я работаю над Macbook Pro 2019. Я хочу использовать Firebase / Auth, Firebase / Firestore, Firebase / Analytics и Firebase / Core. Я думаю, что с подфайлом что-то не так. Подфайл:
# Uncomment this line to define a global platform for your project
platform :ios, '10.0'
# Add the Firebase pod for Google Analytics
#pod 'Firebase/Analytics'
# For Analytics without IDFA collection capability, use this pod instead
# pod ‘Firebase/AnalyticsWithoutAdIdSupport’
# Add the pods for any other Firebase products you want to use in your app
# For example, to use Firebase Authentication and Cloud Firestore
#pod 'Firebase/Auth'
#pod 'Firebase/Firestore'
# 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
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Core'
pod 'Firebase/Firestore'
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|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
Доктор трепетания:
[✓] Flutter (Channel stable, 2.2.1, on macOS 11.2.3 20D91 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] Connected device (2 available)
• No issues found!
AppDelegate.swift:
import UIKit
import Firebase
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions:
[UIApplicationLaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
return true
}
}
Ошибка:
Запуск flutter pub в ProjectZeus ... Запуск lib / main.dart на iPhone 12 Pro Max в режиме отладки ... Запуск установки модуля ... Запуск сборки Xcode ... Сборка Xcode завершена. 10.8s Не удалось создать приложение для iOS. Вывод ошибки из сборки Xcode: ↳ ** BUILD FAILED **.
Вывод Xcode: ↳ Сгенерирована 1 ошибка. note: Использование новой системы сборки Примечание: Параллельное построение целей Примечание: Планирование сборки Примечание: Анализ рабочей области Примечание: Создание описания сборки Примечание: Подготовка сборки завершена, предупреждение: Возможности для подписи и возможностей могут работать некорректно, потому что в его правах используется идентификатор группы-заполнитель. Чтобы решить эту проблему, выберите команду разработчиков в редакторе Runner. (в целевой Runner из проекта Runner)
Не удалось собрать приложение для симулятора. Ошибка запуска приложения на iPhone 12 Pro Max.
Заранее спасибо