Firebase iOS SDK Crashing with FIRInstallations validateAppOptions:appName

511

You should add apiKey value to FirebaseOptions on iOS too, it worked for me!

FirebaseApp.configure(
   name: 'name',
  options: Platform.isIOS
      ?  const FirebaseOptions(
          googleAppID: '1:xxxx',
          gcmSenderID: 'xxxx',
          databaseURL: 'https://xxxx.firebaseio.com',
          apiKey:'xxx',
        )
      : const FirebaseOptions(
          googleAppID: '1:xxx',
          apiKey: 'xxx',
          databaseURL: 'https://xx.firebaseio.com',
        )
);
Share:
511
sumitkanoje
Author by

sumitkanoje

Updated on December 18, 2022

Comments

  • sumitkanoje
    sumitkanoje over 1 year

    I am using Firebase to develop iOS app on Flutter,

    My pubsec.yaml file has

      firebase_core: 0.4.3+3
      firebase_auth: ^0.14.0+5
      firebase_database: ^3.1.1
    

    Below is the error I get,

    *** First throw call stack:
    (
        0   CoreFoundation                      0x00007fff23c7127e __exceptionPreprocess + 350
        1   libobjc.A.dylib                     0x00007fff513fbb20 objc_exception_throw + 48
        2   CoreFoundation                      0x00007fff23c710bc +[NSException raise:format:] + 188
        3   Runner                              0x0000000106000e9f +[FIRInstallations validateAppOptions:appName:] + 799
        4   Runner                              0x00000001060009eb -[FIRInstallations initWithAppOptions:appName:installationsIDController:prefe<…>
    
  • Hermes
    Hermes over 4 years
    You should include a code snippet or example of your solution.