3

I am running an app with the Firebase 3.x SDK, and looking to conditionally use a different configuration .plist to point to a different Firebase location depending on whether the app is configured for development vs production.

I am trying to use FIRApp's configureWithOptions to accomplish this, where I set a different plist path for the FIROptions that I pass as a parameter. However, when I use a path to something like "GoogleService-Dev-Info.plist" I get a console warning from Firebase/Core that states "GoogleService-Info.plist" could not be found. I see that all of the properties of the FIROptions object are populated with what I would have expected out of my GoogleService-Dev-Info.plist file, so I'm not sure what I'm not understanding. Is there something hardcoded in the Firebase SDK to go to GoogleService-Info.plist regardless of any options passed in?

adjuremods
  • 2,938
  • 2
  • 12
  • 17
slpaulson
  • 108
  • 8

2 Answers2

2

If someone else has the same doubt, a code example in Swift 3 is below:

let firebaseOptions = FirebaseOptions(contentsOfFile: Bundle.main.path(forResource: "GoogleService-Dev-Info", ofType: ".plist")!)
FirebaseApp.configure(options: firebaseOptions!)
thacilima
  • 242
  • 3
  • 9
0

I found the answer. Due to my ignorance as to how CocoaPods works, when doing a pod install I didn't actually have the latest version of Firebase installed. Running a pod update updated my Firebase version, and the console warning went away.

slpaulson
  • 108
  • 8