Firebase Instance ID service.
Functions
| Function | Description |
|---|---|
| getInstallations(app) | Gets the Installations service for the default app or a given app.getInstallations() can be called with no arguments to access the default app's Installations service or as getInstallations(app) to access the Installations service associated with a specific app. |
Classes
| Class | Description |
|---|---|
| FirebaseInstallationsError | Firebase Installations error code structure. This extends FirebaseError. |
| Installations | The Installations service for the current app. |
Variables
| Variable | Description |
|---|---|
| InstallationsErrorCode | The constant mapping for valid Installations client error codes. |
Type Aliases
| Type Alias | Description |
|---|---|
| InstallationsErrorCode | The type definition for valid Installations client error codes. |
getInstallations(app)
Gets the Installations service for the default app or a given app.
getInstallations() can be called with no arguments to access the default app's Installations service or as getInstallations(app) to access the Installations service associated with a specific app.
Signature:
export declare function getInstallations(app?: App): Installations;
Parameters
| Parameter | Type | Description |
|---|---|---|
| app | App | Optional app whose Installations service to return. If not provided, the default Installations service will be returned. |
Returns:
The default Installations service if no app is provided or the Installations service associated with the provided app.
Example 1
// Get the Installations service for the default app
const defaultInstallations = getInstallations();
Example 2
// Get the Installations service for a given app
const otherInstallations = getInstallations(otherApp);
InstallationsErrorCode
The constant mapping for valid Installations client error codes.
Signature:
InstallationsErrorCode: {
readonly INVALID_ARGUMENT: "invalid-argument";
readonly INVALID_PROJECT_ID: "invalid-project-id";
readonly INVALID_INSTALLATION_ID: "invalid-installation-id";
readonly API_ERROR: "api-error";
}
InstallationsErrorCode
The type definition for valid Installations client error codes.
Signature:
export type InstallationsErrorCode = typeof InstallationsErrorCode[keyof typeof InstallationsErrorCode];