【发布时间】:2021-05-05 10:36:20
【问题描述】:
我在这个网站上尝试了所有可能的答案,但都没有奏效。我添加了一个 pod 文件,但在导入 Firebase 后,我不断收到 (No such module 'Firebase') 错误
我正在使用带有 M1 的 Macbook Air
import UIKit
import Flutter
import Firebase
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
FirebaseApp.configure()
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
这是我的 pod 文件的样子
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Runner' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for Runner
end
# add the Firebase pod for Google Analytics
pod 'Firebase/Analytics', '7.2-M1'
# add pods for any other desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods
【问题讨论】:
-
试过这个不行
-
尝试构建项目以准备 Xcode 模块缓存。
标签: ios xcode firebase flutter