FirebaseCore Framework Reference Stay organized with collections Save and categorize content based on your preferences.
FIROptions
@interfaceFIROptions:NSObject<NSCopying>This class provides constant fields of Google APIs.
Returns the default options. The first time this is called it synchronously readsGoogleService-Info.plist from disk.
Declaration
Objective-C
+(nullableFIROptions*)defaultOptions;An API key used for authenticating requests from your Apple app, e.g.The key must begin with “A” and contain exactly 39 alphanumeric characters, used to identify yourapp to Google servers.
Declaration
Objective-C
@property(nonatomic,copy,nullable)NSString*APIKey;The bundle ID for the application. Defaults to
Bundle.main.bundleIdentifierwhen not setmanually or in a plist.Declaration
Objective-C
@property(nonatomic,copy)NSString*_NonnullbundleID;The OAuth2 client ID for Apple applications used to authenticate Google users, for example@“12345.apps.googleusercontent.com”, used for signing in with Google.
Declaration
Objective-C
@property(nonatomic,copy,nullable)NSString*clientID;The Project Number from the Google Developer’s console, for example @“012345678901”, used toconfigure Firebase Cloud Messaging.
Declaration
Objective-C
@property(nonatomic,copy)NS_SWIFT_NAMENSString*GCMSenderID;The Project ID from the Firebase console, for example @“abc-xyz-123”.
Declaration
Objective-C
@property(nonatomic,copy,nullable)NSString*projectID;The Google App ID that is used to uniquely identify an instance of an app.
Declaration
Objective-C
@property(nonatomic,copy)NSString*_NonnullgoogleAppID;The database root URL, e.g. @“http://abc-xyz-123.firebaseio.com”.
Declaration
Objective-C
@property(nonatomic,copy,nullable)NSString*databaseURL;The Google Cloud Storage bucket name, e.g. @“abc-xyz-123.storage.firebase.com”.
Declaration
Objective-C
@property(nonatomic,copy,nullable)NSString*storageBucket;The App Group identifier to share data between the application and the application extensions.The App Group must be configured in the application and on the Apple Developer Portal. Defaultvalue
nil.Declaration
Objective-C
@property(nonatomic,copy,nullable)NSString*appGroupID;Initializes a customized instance of FirebaseOptions from the file at the given plist file path.This will read the file synchronously from disk.For example:
ifletpath=Bundle.main.path(forResource:"GoogleService-Info",ofType:"plist"){letoptions=FirebaseOptions(contentsOfFile:path)}Note that it is not possible to customize
FirebaseOptionsfor Firebase Analytics which expectsa static file namedGoogleService-Info.plist-https://github.com/firebase/firebase-ios-sdk/issues/230.Returnsnilif the plist file does not exist or is invalid.Declaration
Objective-C
-(nullableinstancetype)initWithContentsOfFile:(nonnullNSString*)plistPath;Initializes a customized instance of
FirebaseOptionswith required fields. Use the mutableproperties to modify fields for configuring specific services. Note that it is not possible tocustomizeFirebaseOptionsfor Firebase Analytics which expects a static file namedGoogleServices-Info.plist-https://github.com/firebase/firebase-ios-sdk/issues/230.Declaration
Objective-C
-(nonnullinstancetype)initWithGoogleAppID:(nonnullNSString*)googleAppIDGCMSenderID:(nonnullNSString*)GCMSenderID;Unavailable
Unavailable. Please use
init(contentsOfFile:)orinit(googleAppID:gcmSenderID:)instead.Declaration
Objective-C
-(nonnullinstancetype)init;
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-10 UTC.