Aqu*_*irl 2 firebase visual-studio-code flutter
我安装了 XCode,因为 flutter doctor 需要它,但我没有使用它。
我正在使用 VSCode。
在 VSCode 中我应该把这个名为 的文件放在哪里GoogleService-Info.plist?
该项目使用 Flutter 和 Firebase。
这是错误:
Exception has occurred. FirebaseException ([core/not-initialized] Firebase has not been correctly initialized. Have you added the "GoogleService-Info.plist" file to the project?
在 VSCode 中,按照以下步骤操作
\nAppDelegate.swift并在这样的文件中配置 firebase
import UIKit\nimport Flutter\nimport Firebase /// 1. ADD THIS LINE\n\n@UIApplicationMain\n@objc class AppDelegate: FlutterAppDelegate {\n override func application(\n _ application: UIApplication,\n didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?\n ) -> Bool {\n FirebaseApp.configure() /// 2. ADD THIS LINE\n GeneratedPluginRegistrant.register(with: self)\n \n return super.application(application, didFinishLaunchingWithOptions: launchOptions)\n }\n}\nRun Code Online (Sandbox Code Playgroud)\n
| 归档时间: |
|
| 查看次数: |
6206 次 |
| 最近记录: |