0
當您只有一個目標時,Firebase建議使用它來支持多個環境。儘管這很快,但是由於反應原生中的appledelegate.m並不使用swift,因此目標c會是什麼。firebase中的swift代碼等效於目標c
let filePath = Bundle.main.path(forResource: "MyGoogleService", ofType: "plist")
guard let fileopts = FIROptions.init(contentsOfFile: filePath)
else { assert(false, "Couldn't load config file") }
FIRApp.configure(with: fileopts)