This sample demonstrates how to use Firebase's Combine APIs.
- Create a new Firebase project via the Firebase console
- Enable the required Firebase services in the Firebase project you created in step 1
- Firebase Authentication
- Enable Anonymous Auth
- Firebase Authentication
- Register this demo app as an iOS project
- Download
GoogleServices-Info.plistand drag it into your project (it's easiest if you place it just next toInfo.plist)
Currently, Combine support for Firebase is still under development, which is why we haven't enabled the respective Swift Package Manager products yet. You need to do so yourself:
In Package.swift, find the following lines:
// TODO: Re-enable after API review passes.
// .library(
// name: "FirebaseCombineSwift-Beta",
// targets: ["FirebaseCombineSwift"]
// ),
// .library(
// name: "FirebaseAuthCombineSwift-Beta",
// targets: ["FirebaseAuthCombineSwift"]
// ),
// .library(
// name: "FirebaseFunctionsCombineSwift-Beta",
// targets: ["FirebaseFunctionsCombineSwift"]
// ),
// .library(
// name: "FirebaseStorageCombineSwift-Beta",
// targets: ["FirebaseStorageCombineSwift"]
// ),and uncomment them:
// TODO: Re-enable after API review passes.
.library(
name: "FirebaseCombineSwift-Beta",
targets: ["FirebaseCombineSwift"]
),
.library(
name: "FirebaseAuthCombineSwift-Beta",
targets: ["FirebaseAuthCombineSwift"]
),
.library(
name: "FirebaseFunctionsCombineSwift-Beta",
targets: ["FirebaseFunctionsCombineSwift"]
),
.library(
name: "FirebaseStorageCombineSwift-Beta",
targets: ["FirebaseStorageCombineSwift"]
),The app should now compile.