FirebaseFirestore Framework Reference Stay organized with collections Save and categorize content based on your preferences.
Protocols
The following protocols are available globally.
Represents a listener that can be removed by calling remove.
Declaration
Swift
protocolListenerRegistration:NSObjectProtocolMarker protocol implemented by all supported cache settings.
The two cache types supported are
PersistentCacheSettingsandMemoryCacheSettings. Custom implementation is not supported.Declaration
Swift
protocolLocalCacheSettingsMarker protocol implemented by all supported garbage collector settings.
The two cache types supported are
MemoryEagerGCSettingsandMemoryLRUGCSettings. Custom implementation is not supported.Declaration
Swift
protocolMemoryGarbageCollectorSettingsA type that can initialize itself from a Firestore
DocumentReference,which makes it suitable for use with the@DocumentIDproperty wrapper.Firestore includes extensions that make
StringandDocumentReferenceconform toDocumentIDWrappable.Note that Firestore ignores fields annotated with
@DocumentIDwhen writingso there is no requirement to convert from the wrapped type back to aDocumentReference.Declaration
Swift
publicprotocolDocumentIDWrappableA type that can initialize itself from a Firestore Timestamp, which makesit suitable for use with the
@ServerTimestampproperty wrapper.Firestore includes extensions that make
TimestampandDateconform toServerTimestampWrappable.Declaration
Swift
publicprotocolServerTimestampWrappable
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-03-11 UTC.