FirestoreSettings
class FirestoreSettings : NSObject, NSCopying
Settings used to configure a Firestore
instance.
-
Creates and returns an empty
FirestoreSettings
object.Declaration
Swift
init()
Return Value
The created
FirestoreSettings
object. -
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
cacheSettings
instead.NOTE: This field will be deprecated in a future major release. Use the
cacheSettings
field 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
cacheSettings
instead.NOTE: This field will be deprecated in a future major release. Use the
cacheSettings
field 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
FirestoreCacheSizeUnlimited
to disable garbage collection entirely.Declaration
Swift
var cacheSizeBytes: Int64 { get set }
-
Specifies the cache used by the SDK. Available options are
PersistentCacheSettings
andMemoryCacheSettings
, each with different configuration options.When unspecified,
PersistentCacheSettings
will be used by default.NOTE: setting this field and
cacheSizeBytes
orpersistenceEnabled
at the same time will throw an exception during SDK initialization. Instead, use the configuration in thePersistentCacheSettings
object to specify the cache size.Declaration
Swift
var cacheSettings: any NSObjectProtocol & FIRLocalCacheSettings { get set }