Stay organized with collections
Save and categorize content based on your preferences.
FIRApp
@interfaceFIRApp:NSObject
The entry point of Firebase SDKs.
Initialize and configure FirebaseApp using FirebaseApp.configure()
or other customized ways as shown below.
The logging system has two modes: default mode and debug mode. In default mode, only logs with
log level Notice, Warning and Error will be sent to device. In debug mode, all logs will be sent
to device. The log levels that Firebase uses are consistent with the ASL log levels.
Enable debug mode by passing the -FIRDebugEnabled argument to the application. You can add this
argument in the application’s Xcode scheme. When debug mode is enabled via -FIRDebugEnabled,
further executions of the application will also be in debug mode. In order to return to default
mode, you must explicitly disable the debug mode with the application argument
-FIRDebugDisabled.
It is also possible to change the default logging level in code by calling
FirebaseConfiguration.shared.setLoggerLevel(_:) with the desired level.
Configures a default Firebase app. Raises an exception if any configuration step fails. The
default app is named “__FIRAPP_DEFAULT”. This method should be called after the app is launched
and before using Firebase services. This method should be called from the main thread and
contains synchronous file I/O (reading GoogleService-Info.plist from disk).
Configures the default Firebase app with the provided options. The default app is named
“__FIRAPP_DEFAULT”. Raises an exception if any configuration step fails. This method should be
called from the main thread.
Configures a Firebase app with the given name and options. Raises an exception if any
configuration step fails. This method should be called from the main thread.
FirebaseApp instances should not be initialized directly. Call FirebaseApp.configure(),
FirebaseApp.configure(options:), or FirebaseApp.configure(name:options:) directly.
Gets or sets whether automatic data collection is enabled for all products. Defaults to true
unless FirebaseDataCollectionDefaultEnabled is set to NO in your app’s Info.plist. This value
is persisted across runs of the app so that it can be set once when users have consented to
collection.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-11 UTC."],[],[],null,["# FirebaseCore Framework Reference\n\nFIRApp\n======\n\n\n @interface FIRApp : NSObject\n\nThe entry point of Firebase SDKs.\n\nInitialize and configure `FirebaseApp` using `FirebaseApp.configure()`\nor other customized ways as shown below.\n\nThe logging system has two modes: default mode and debug mode. In default mode, only logs with\nlog level Notice, Warning and Error will be sent to device. In debug mode, all logs will be sent\nto device. The log levels that Firebase uses are consistent with the ASL log levels.\n\nEnable debug mode by passing the `-FIRDebugEnabled` argument to the application. You can add this\nargument in the application's Xcode scheme. When debug mode is enabled via `-FIRDebugEnabled`,\nfurther executions of the application will also be in debug mode. In order to return to default\nmode, you must explicitly disable the debug mode with the application argument\n`-FIRDebugDisabled`.\n\nIt is also possible to change the default logging level in code by calling\n`FirebaseConfiguration.shared.setLoggerLevel(_:)` with the desired level.\n- `\n ``\n ``\n `\n\n ### [+configure](#/c:objc(cs)FIRApp(cm)configure)\n\n `\n ` \n Configures a default Firebase app. Raises an exception if any configuration step fails. The\n default app is named \"__FIRAPP_DEFAULT\". This method should be called after the app is launched\n and before using Firebase services. This method should be called from the main thread and\n contains synchronous file I/O (reading GoogleService-Info.plist from disk). \n\n #### Declaration\n\n Objective-C \n\n + (void)configure;\n\n- `\n ``\n ``\n `\n\n ### [+configureWithOptions:](#/c:objc(cs)FIRApp(cm)configureWithOptions:)\n\n `\n ` \n Configures the default Firebase app with the provided options. The default app is named\n \"__FIRAPP_DEFAULT\". Raises an exception if any configuration step fails. This method should be\n called from the main thread. \n\n #### Declaration\n\n Objective-C \n\n + (void)configureWithOptions:(nonnull ../Classes/FIROptions.html *)options;\n\n #### Parameters\n\n |-----------------|-----------------------------------------------------------------|\n | ` `*options*` ` | The Firebase application options used to configure the service. |\n\n- `\n ``\n ``\n `\n\n ### [+configureWithName:options:](#/c:objc(cs)FIRApp(cm)configureWithName:options:)\n\n `\n ` \n Configures a Firebase app with the given name and options. Raises an exception if any\n configuration step fails. This method should be called from the main thread. \n\n #### Declaration\n\n Objective-C \n\n + (void)configureWithName:(nonnull NSString *)name\n options:(nonnull ../Classes/FIROptions.html *)options;\n\n #### Parameters\n\n |-----------------|---------------------------------------------------------------------------------------------------------------------|\n | ` `*name*` ` | The application's name given by the developer. The name should should only contain Letters, Numbers and Underscore. |\n | ` `*options*` ` | The Firebase application options used to configure the services. |\n\n- `\n ``\n ``\n `\n\n ### [+defaultApp](#/c:objc(cs)FIRApp(cm)defaultApp)\n\n `\n ` \n Returns the default app, or `nil` if the default app does not exist. \n\n #### Declaration\n\n Objective-C \n\n + (nullable FIRApp *)defaultApp;\n\n- `\n ``\n ``\n `\n\n ### [+appNamed:](#/c:objc(cs)FIRApp(cm)appNamed:)\n\n `\n ` \n Returns a previously created `FirebaseApp` instance with the given name, or `nil` if no such app\n exists. This method is thread safe. \n\n #### Declaration\n\n Objective-C \n\n + (nullable FIRApp *)appNamed:(nonnull NSString *)name;\n\n- `\n ``\n ``\n `\n\n ### [allApps](#/c:objc(cs)FIRApp(cpy)allApps)\n\n `\n ` \n Returns the set of all extant `FirebaseApp` instances, or `nil` if there are no `FirebaseApp`\n instances. This method is thread safe. \n\n #### Declaration\n\n Objective-C \n\n @property (class, readonly, nullable) NSDictionary\u003cNSString *, FIRApp *\u003e *allApps;\n\n- `\n ``\n ``\n `\n\n ### [-deleteApp:](#/c:objc(cs)FIRApp(im)deleteApp:)\n\n `\n ` \n Cleans up the current `FirebaseApp`, freeing associated data and returning its name to the pool\n for future use. This method is thread safe. \n\n #### Declaration\n\n Objective-C \n\n - (void)deleteApp:(nonnull void (^)(BOOL))completion;\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)FIRApp(im)init)\n\n `\n ` \n Unavailable \n `FirebaseApp` instances should not be initialized directly. Call `FirebaseApp.configure()`,\n `FirebaseApp.configure(options:)`, or `FirebaseApp.configure(name:options:)` directly. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)init;\n\n- `\n ``\n ``\n `\n\n ### [name](#/c:objc(cs)FIRApp(py)name)\n\n `\n ` \n Gets the name of this app. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, copy, readonly) NSString *_Nonnull name;\n\n- `\n ``\n ``\n `\n\n ### [options](#/c:objc(cs)FIRApp(py)options)\n\n `\n ` \n Gets a copy of the options for this app. These are non-modifiable. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, copy, readonly) ../Classes/FIROptions.html *_Nonnull options;\n\n- `\n ``\n ``\n `\n\n ### [dataCollectionDefaultEnabled](#/c:objc(cs)FIRApp(py)dataCollectionDefaultEnabled)\n\n `\n ` \n Gets or sets whether automatic data collection is enabled for all products. Defaults to `true`\n unless `FirebaseDataCollectionDefaultEnabled` is set to `NO` in your app's Info.plist. This value\n is persisted across runs of the app so that it can be set once when users have consented to\n collection. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, assign, unsafe_unretained, readwrite,\n getter=isDataCollectionDefaultEnabled)\n BOOL dataCollectionDefaultEnabled;"]]