firebase::AppOptions

#include <app.h>

Options that control the creation of a Firebase App.

Summary

See also: firebase::App

Constructors and Destructors

AppOptions()
Create AppOptions.

Public functions

api_key() const
const char *
Get the API key.
app_id() const
const char *
Retrieves the app ID.
database_url() const
const char *
Get database root URL, e.g.
messaging_sender_id() const
const char *
Get the Firebase Cloud Messaging sender ID.
set_api_key(const char *key)
void
API key used to authenticate requests from your app.
set_app_id(const char *id)
void
Set the Firebase app ID used to uniquely identify an instance of an app.
set_database_url(const char *url)
void
Set the database root URL, e.g. "http://abc-xyz-123.firebaseio.com".
set_messaging_sender_id(const char *sender_id)
void
Set the Firebase Cloud Messaging sender ID.
set_storage_bucket(const char *bucket)
void
Set the Google Cloud Storage bucket name, e.g.
storage_bucket() const
const char *
Get the Google Cloud Storage bucket name,.

Public functions

AppOptions

 AppOptions()

Create AppOptions.

To create a firebase::App object, the Firebase application identifier and API key should be set using set_app_id() and set_api_key() respectively.

See also:firebase::App::Create().

api_key

const char * api_key() const 

Get the API key.

See also:set_api_key().

app_id

const char * app_id() const 

Retrieves the app ID.

See also:set_app_id().

database_url

const char * database_url() const 

Get database root URL, e.g.

"http://abc-xyz-123.firebaseio.com".

messaging_sender_id

const char * messaging_sender_id() const 

Get the Firebase Cloud Messaging sender ID.

See also:set_messaging_sender_id().

set_api_key

void set_api_key(
  const char *key
)

API key used to authenticate requests from your app.

For example, "AIzaSyDdVgKwhZl0sTTTLZ7iTmt1r3N2cJLnaDk" used to identify your app to Google servers.

This only needs to be specified if your application does not include google-services.json or GoogleService-Info.plist in its resources.

set_app_id

void set_app_id(
  const char *id
)

Set the Firebase app ID used to uniquely identify an instance of an app.

This is the mobilesdk_app_id in the Android google-services.json config file or PROJECT_ID in the GoogleService-Info.plist.

This only needs to be specified if your application does not include google-services.json or GoogleService-Info.plist in its resources.

set_database_url

void set_database_url(
  const char *url
)

Set the database root URL, e.g. "http://abc-xyz-123.firebaseio.com".

set_messaging_sender_id

void set_messaging_sender_id(
  const char *sender_id
)

Set the Firebase Cloud Messaging sender ID.

For example "012345678901", used to configure Firebase Cloud Messaging.

This only needs to be specified if your application does not include google-services.json or GoogleService-Info.plist in its resources.

set_storage_bucket

void set_storage_bucket(
  const char *bucket
)

Set the Google Cloud Storage bucket name, e.g.

\"abc-xyz-123.storage.firebase.com\".

storage_bucket

const char * storage_bucket() const 

Get the Google Cloud Storage bucket name,.

See also:set_storage_bucket().

Send feedback about...

Need help? Visit our support page.