Package-level declarations

Types

Link copied to clipboard
object Firebase

Single access point to all Firebase SDKs, mirroring com.google.firebase.Firebase from the Firebase Android SDK.

Link copied to clipboard

Exception thrown when a Firebase API is not available on the current platform or configuration.

Link copied to clipboard
actual class FirebaseApp
actual class FirebaseApp
expect class FirebaseApp

The entry point of Firebase SDKs, mirroring com.google.firebase.FirebaseApp from the Firebase Android SDK.

actual class FirebaseApp
actual class FirebaseApp
Link copied to clipboard
actual open class FirebaseException : Exception
actual open class FirebaseException : Exception
expect open class FirebaseException : Exception

Base class for all Firebase exceptions, mirroring com.google.firebase.FirebaseException.

actual open class FirebaseException : Exception
actual open class FirebaseException : Exception
Link copied to clipboard

Exception thrown when a request to a Firebase service fails due to a network error.

Link copied to clipboard
actual class FirebaseOptions
actual class FirebaseOptions
expect class FirebaseOptions

Configurable Firebase options, mirroring com.google.firebase.FirebaseOptions from the Firebase Android SDK. fromResource takes an Android Context and can only be called from Android code: from common code it fails to compile with a message naming the replacement, Firebase.fromResource.

actual class FirebaseOptions
actual class FirebaseOptions
Link copied to clipboard

Exception thrown when a request to a Firebase service has been blocked due to having received too many requests.

Link copied to clipboard
actual class Timestamp(seconds: Long, nanoseconds: Int) : Comparable<Timestamp>
expect class Timestamp(seconds: Long, nanoseconds: Int) : Comparable<Timestamp>

A point in time with nanosecond precision, mirroring com.google.firebase.Timestamp from the Firebase Android SDK.

actual class Timestamp(seconds: Long, nanoseconds: Int) : Comparable<Timestamp>
actual class Timestamp(val seconds: Long, val nanoseconds: Int) : Comparable<Timestamp>

Properties

Link copied to clipboard

Returns the default FirebaseApp instance.

Link copied to clipboard

Functions

Link copied to clipboard

Returns the FirebaseApp instance with the given name.

Link copied to clipboard
actual fun Firebase.fromResource(context: Any?): FirebaseOptions?
actual fun Firebase.fromResource(context: Any?): FirebaseOptions?

The options from GoogleService-Info.plist, or null when the bundle has none; the context is ignored.

expect fun Firebase.fromResource(context: Any? = null): FirebaseOptions?

The default FirebaseOptions of the platform's configuration, mirroring FirebaseOptions.fromResource(Context) from the Firebase Android SDK as a top-level function with the Context widened to Any? so that common code can call it. On Android they come from the resources generated by the Google Services Gradle plugin from google-services.json, on Apple platforms from GoogleService-Info.plist (the context is ignored); JS has no default configuration and returns null, as Android does when the resources are missing.

actual fun Firebase.fromResource(context: Any?): FirebaseOptions?

Always null: JS has no default configuration to read options from.

actual fun Firebase.fromResource(context: Any?): FirebaseOptions?
Link copied to clipboard
actual fun Firebase.getApps(context: Any?): List<FirebaseApp>
actual fun Firebase.getApps(context: Any?): List<FirebaseApp>

All initialized apps; the context is ignored.

expect fun Firebase.getApps(context: Any? = null): List<FirebaseApp>

The initialized apps, mirroring FirebaseApp.getApps(Context) from the Firebase Android SDK as a top-level function with the Context widened to Any? so that common code can call it (the static member itself cannot be given an Any? overload). On Android context must be an android.content.Context; on Apple platforms and JS it is ignored.

actual fun Firebase.getApps(context: Any?): List<FirebaseApp>

All initialized apps; the context is ignored.

actual fun Firebase.getApps(context: Any?): List<FirebaseApp>
Link copied to clipboard
actual fun Firebase.initialize(context: Any?): FirebaseApp?
actual fun Firebase.initialize(context: Any?, options: FirebaseOptions): FirebaseApp
actual fun Firebase.initialize(context: Any?, options: FirebaseOptions, name: String): FirebaseApp
actual fun Firebase.initialize(context: Any?): FirebaseApp?

Configures the default app from GoogleService-Info.plist; the context is ignored.

actual fun Firebase.initialize(context: Any?, options: FirebaseOptions): FirebaseApp

Configures the default app with the given options; the context is ignored.

actual fun Firebase.initialize(context: Any?, options: FirebaseOptions, name: String): FirebaseApp

Configures the app named name with the given options; the context is ignored.

expect fun Firebase.initialize(context: Any? = null): FirebaseApp?

Initializes the default FirebaseApp, mirroring Firebase.initialize(Context) from the Firebase Android SDK with the Context widened to Any? so that common code can pass the platform context through.

expect fun Firebase.initialize(context: Any? = null, options: FirebaseOptions): FirebaseApp

Initializes the default FirebaseApp with options; see initialize.

expect fun Firebase.initialize(context: Any? = null, options: FirebaseOptions, name: String): FirebaseApp

Initializes the FirebaseApp called name with options; see initialize.

actual fun Firebase.initialize(context: Any?): FirebaseApp?

Not supported on JS, where the options cannot be read from a default configuration: always throws.

actual fun Firebase.initialize(context: Any?, options: FirebaseOptions): FirebaseApp

Initializes the default app with the given options; the context is ignored.

actual fun Firebase.initialize(context: Any?, options: FirebaseOptions, name: String): FirebaseApp

Initializes the app named name with the given options; the context is ignored.

actual fun Firebase.initialize(context: Any?): FirebaseApp?
actual fun Firebase.initialize(context: Any?, options: FirebaseOptions): FirebaseApp
actual fun Firebase.initialize(context: Any?, options: FirebaseOptions, name: String): FirebaseApp
Link copied to clipboard
fun Timestamp(instant: Instant): Timestamp

Creates a Timestamp for the given instant, the multiplatform form of the JVM-only Timestamp(Instant) constructor.

Link copied to clipboard

This timestamp as a kotlin.time.Instant, the multiplatform form of the JVM-only toInstant() and toDate().