Hey I am playing with the new firebase iOS SDK, in my project, I have only one target, I created two configurations, Debug and Release, with different bundler identifier, but se
Add both Google Service plists to your project, with different names:
Then for each Build Scheme, select Edit Scheme and add a unique value for an environment variable like so:
So the other build scheme's BUILD_FOR environment variable would be set to "DEV", for example.
Then, you would check for this variable in App Delegate and configure the FIRApp according to which scheme was built:
let buildFor = ProcessInfo.processInfo.environment["BUILD_FOR"]! as String
var firebasePlistFileName = "GoogleService-Info"
if buildFor == "PROD" {
firebasePlistFileName = "GoogleService-Prod-Info"
}
let firbaseOptions = FIROptions(contentsOfFile: Bundle.main.path(forResource: firebasePlistFileName, ofType: "plist"))
FIRApp.configure(with: firbaseOptions!)