728x90
![[React Native] Error: No Firebase App '[DEFAULT]' has been created - call firebase.initializeApp() [React Native] Error: No Firebase App '[DEFAULT]' has been created - call firebase.initializeApp()](http://t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png)
에러 상황
iOS에서 React Native 앱 빌드 후 아래와 같은 오류 메시지가 출력됐다.
에러 코드
Error: No Firebase App '[DEFAULT]' has been created - call firebase.initializeApp()
해결 방법
프로젝트에서 Firebase 라이브러리를 사용하는데 해당 라이브러리가 초기화되지 않아서 발생한 오류였다.
AppDelegate.swift 파일에 아래 코드를 추가한 후 정상적으로 동작됐다.
// 의존성 추가
import FirebaseCore
@main
class AppDelegate: RCTAppDelegate {
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
...
// Firebase 초기화 코드 추가
FirebaseApp.configure()
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
...
}
728x90
'📱Mobile > 오류해결' 카테고리의 다른 글
[React Native] Error installing boost (0) | 2025.04.03 |
---|---|
[React Native] could not build objective-c module (0) | 2025.03.11 |
[React Native] Reached end of file while looking for: Mach-O slice. (0) | 2024.05.21 |
[React Native] react-native init 오류 - TypeError: cli.init is not a function (0) | 2024.01.11 |
[React Native] iOS 배포 오류 React-Native-Splash-Screen Symbolic Link (1) | 2023.10.27 |
댓글