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
Firebase includes official documentation for how to do this now. I used this method in my app and it works great.
More specifically, I defined a custom Swift flag "BUILD_TYPE" in XCode and for each scheme, I define a unique value for that flag. Then, in my AppDelegate, I tell Firebase what GoogleService-___.plist
file to load at runtime by this Swift flag value:
let filePath = Bundle.main.path(forResource: "GoogleService-" + Bundle.main.infoDictionary!["BUILD_FLAVOR"] as! String, ofType: "plist")
guard let fileopts = FirebaseOptions.init(contentsOfFile: filePath!) else {
fatalError("Couldn't load config file")
}
FirebaseApp.configure(options: fileopts)