Skip to content

FirebaseApp.configure(options: options) not loads data when passing FirebaseOptions #230

Open
@ashhanai

Description

@ashhanai

Describe your environment

  • Xcode version: 8.3.3
  • Firebase SDK version: 4.1.1
  • Library version: 4.0.6
  • Firebase Product: core

Describe the problem

In my app, I have more targets and configurations which require more GoogleServices-Info.plists. I have them all downloaded from firebase console after registering new apps.

On app launch, I am trying to load FirebaseOptions from plist at file path via FirebaseOptions(contentsOfFile: plistPath). Finding plistPath via Bundle.main.path(forResource: plistName, ofType: "plist") (every plist have different name). Although path to plist is found and init is returning FirebaseOptions instance, returned instance is empty.

FirebaseApp.configure(options: options) is then complaining about not finding plist named GoogleService-Info.plist.

Steps to reproduce:

PlistName is different than GoogleService-Info.

guard let plistPath = Bundle.main.path(forResource: plistName, ofType: "plist") else {
    fatalError()
}
         
guard let options = FirebaseOptions(contentsOfFile: plistPath) else {
    fatalError()
}
        
FirebaseApp.configure(options: options)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions