Flutter ios FirebaseApp.configure() doesn't start app
 
Error Desc
Desc1: Flutter ios FirebaseApp.configure() doesn't start app. 
Desc2: Exception NSException * "Default app has already been configured." 0x0000600001de9a70
Desc3: IOS FcmDartService#start on channel plugins.flutter.io/firebase_messaging)


STEP 1 - GoogleService-Info.plist
1- Download "GoogleService-Info.plist" 
2- Open Xcode 
3- Click Runner (Runner.xcodeproj) 
4- Drag "GoogleService-Info.plist" to under Info.plist 




STEP 2 - AppDelegate.swift

OLD CODE - AppDelegate.swift

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)
  }
     
}


NEW CODE - AppDelegate.swift

import UIKit
import Flutter
import Firebase

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {

override init() {
    super.init()
    FirebaseApp.configure()
  }
    
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
    
    
}





 

Author: Engin ATALAY
Date: 24.01.2021 23:20:21
View Count: 596
 
 

COMMENTS
 
No comments yet. Be the first to comment who you are.
 
 
 
 
 
 
 
WRITE COMMENT
 
 
Your Name :
 
 
 
E-mail :
 
 
 
Your Message :
 
 
 
 
 
 
 
This project : ASP.NET MVC , RAZOR, Entity Framework , CSS , HTML , JQUERY(2.0.2) , AJAX the C# side-tier architecture was developed with logic.
 
Yukarı Çık