광어네 맛집
[Firebase Error]FirebaseApp.configure() 에러 처리 본문
728x90
반응형
요즘 코로나가 심해져서
어딜가기가 너무 무서운 것 같음
빨리 코로나가 해결됐으면 좋겠음 ㅜㅜ
오늘 다룰 에러는!
"The default FirebaseApp instance must be configured before the default Authinstance can be initialized. One way to ensure this is to call 'FirebaseApp.configure()' in the App Delegate's' application(_:didFinishLaunching withOptions:)'(or the '@main' struct's initializer in SwiftUI)."
이번 오류가 길다 길어;
나는 인스턴스 초기화해줬는데 왜 오류가 떴지 했는데
읽어보니 AppDelegate에서 처리해줘라 였음!
그래서 아래처럼 추가 구현해줌!
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
}
아직 끝난게 아님!
이런 오류가 한번 더 뜸
"Default app has already been configured"
중복이라고 뜬 걸 보고 SceneDelegate에서 지워주니 해결!!
AppDelegate에서만 구현해주는 걸로 합시다!
SceneDelegate는 UI에 관여해서 굳이 구현할 필요가 없다고...ㅎㅎ...
오늘도 화이팅!
728x90
반응형
'Swift > My Swift Error' 카테고리의 다른 글
[Realm]Realm 폴더 이동 (0) | 2022.04.13 |
---|---|
[TextView]LinesOfNumber, TextView (0) | 2022.04.13 |
[스토리보드 에러]스토리보드에서 Assistant 연결 안될 때 (0) | 2022.04.08 |
[Error] Swift Library Example Error: ASSERTION FAILURE (0) | 2022.04.06 |
[Simulator] 빌드가 너무 느릴 때 (0) | 2022.02.16 |