FirebaseFirestoreSwift Framework Reference

Protocols

The following protocols are available globally.

  • A type that can initialize itself from a FirestoreDocumentReference,which makes it suitable for use with the@DocumentID property wrapper.

    Firestore includes extensions that makeString andDocumentReferenceconform toDocumentIDWrappable.

    Note that Firestore ignores fields annotated with@DocumentID when writingso there is no requirement to convert from the wrapped type back to aDocumentReference.

    Declaration

    Swift

    publicprotocolDocumentIDWrappable
  • A type that can initialize itself from a Firestore Timestamp, which makesit suitable for use with the@ServerTimestamp property wrapper.

    Firestore includes extensions that makeTimestamp andDate conform 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 2022-05-11 UTC.