[flutter] No app has been configured yet. 오류 해결 방법

dev-nam 2023. 3. 27. 23:24

플러터 No app has been configured yet. 오류 해결 방법

플러터 앱에서 파이어베이스 기능을 구현하다가 다음과 같은 오류가 발생했을 때 해결하는 방법에 대해 알아보겠습니다.

[Firebase/Core][I-COR000005] No app has been configured yet.

 

루트 경로에 위치한 ios/Runner/AppDelegate.swift 파일에 파이어베이스 코드를 추가하면 됩니다. 간단하죠?

 

AppDelegate.swift

import UIKit
import Flutter
import Firebase // Add Line.

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    FirebaseApp.configure() // Add Line.
    GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
}

 

반응형