multiple GoogleService-Info support

2 Solutions Collect From Internet About “multiple GoogleService-Info support”

Just use [FIRApp configureWithOptions:]

NSString *firebasePlist = [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"];

    firebasePlist = [[NSBundle mainBundle] pathForResource:@"GoogleService-Info-DEV" ofType:@"plist"];

FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:firebasePlist];
[FIRApp configureWithOptions:options];


var firebasePlist: String? = Bundle.main.path(forResource: "GoogleService-Info", ofType: "plist")
if development == true{
firebasePlist = Bundle.main.path(forResource: "GoogleService-Info-DEV", ofType: "plist")
var options = FIROptions(contentsOfFile: firebasePlist)
FIRApp.configure(with: options)

but you’ll have to have a variable called development with the value of true when you want to use the DEV GoogleService plist and the value of false is you want to use the regular GoogleService plist