FirestoreSettings
class FirestoreSettings : NSObject, NSCopyingSettings used to configure a Firestore instance.
-
Creates and returns an empty
FirestoreSettingsobject.Declaration
Swift
init()Return Value
The created
FirestoreSettingsobject. -
The hostname to connect to.
Declaration
Swift
var host: String { get set } -
Whether to use SSL when connecting.
Declaration
Swift
var isSSLEnabled: Bool { get set } -
A dispatch queue to be used to execute all completion handlers and event handlers. By default, the main queue is used.
Declaration
Swift
var dispatchQueue: dispatch_queue_t { get set } -
Deprecated
This field is deprecated. Use
cacheSettingsinstead.NOTE: This field will be deprecated in a future major release. Use the
cacheSettingsfield instead to specify cache type, and other cache configurations.Set to false to disable local persistent storage.
Declaration
Swift
var isPersistenceEnabled: Bool { get set } -
Deprecated
This field is deprecated. Use
cacheSettingsinstead.NOTE: This field will be deprecated in a future major release. Use the
cacheSettingsfield instead to specify cache size, and other cache configurations.Sets the cache size threshold above which the SDK will attempt to collect least-recently-used documents. The size is not a guarantee that the cache will stay below that size, only that if the cache exceeds the given size, cleanup will be attempted. Cannot be set lower than 1MB.
Set to
FirestoreCacheSizeUnlimitedto disable garbage collection entirely.Declaration
Swift
var cacheSizeBytes: Int64 { get set } -
Specifies the cache used by the SDK. Available options are
PersistentCacheSettingsandMemoryCacheSettings, each with different configuration options.When unspecified,
PersistentCacheSettingswill be used by default.NOTE: setting this field and
cacheSizeBytesorpersistenceEnabledat the same time will throw an exception during SDK initialization. Instead, use the configuration in thePersistentCacheSettingsobject to specify the cache size.Declaration
Swift
var cacheSettings: any NSObjectProtocol & FIRLocalCacheSettings { get set }