Classes

The following classes are available globally.

  • A FIRCollectionReference object can be used for adding documents, getting document references, and querying for documents (using the methods inherited from FIRQuery).

    Declaration

    Swift

    class CollectionReference : Query

    Objective-C

    
    @interface FIRCollectionReference : FIRQuery
  • A FIRDocumentChange represents a change to the documents matching a query. It contains the document affected and the type of change that occurred (added, modified, or removed).

    Declaration

    Swift

    class DocumentChange : NSObject

    Objective-C

    
    @interface FIRDocumentChange : NSObject
  • Options for use with [FIRDocumentReference addSnapshotListener] to control the behavior of the snapshot listener.

    Declaration

    Swift

    class DocumentListenOptions : NSObject

    Objective-C

    
    @interface FIRDocumentListenOptions : NSObject
  • A FIRDocumentReference refers to a document location in a Firestore database and can be used to write, read, or listen to the location. The document at the referenced location may or may not exist. A FIRDocumentReference can also be used to create a FIRCollectionReference to a subcollection.

    Declaration

    Swift

    class DocumentReference : NSObject

    Objective-C

    
    @interface FIRDocumentReference : NSObject
  • A FIRDocumentSnapshot contains data read from a document in your Firestore database. The data can be extracted with the data property or by using subscript syntax to access a specific field.

    Declaration

    Swift

    class DocumentSnapshot : NSObject

    Objective-C

    
    @interface FIRDocumentSnapshot : NSObject
  • A FieldPath refers to a field in a document. The path may consist of a single field name (referring to a top level field in the document), or a list of field names (referring to a nested field in the document).

    Declaration

    Swift

    class FieldPath : NSObject, NSCopying

    Objective-C

    
    @interface FIRFieldPath : NSObject <NSCopying>
  • Sentinel values that can be used when writing document fields with setData() or updateData().

    Declaration

    Swift

    class FieldValue : NSObject

    Objective-C

    
    @interface FIRFieldValue : NSObject
  • FIRFirestore represents a Firestore Database and is the entry point for all Firestore operations.

    Declaration

    Swift

    class Firestore : NSObject

    Objective-C

    
    @interface FIRFirestore : NSObject
  • Settings used to configure a FIRFirestore instance.

    Declaration

    Swift

    class FirestoreSettings : NSObject, NSCopying

    Objective-C

    
    @interface FIRFirestoreSettings : NSObject <NSCopying>
  • An immutable object representing a geographical point in Firestore. The point is represented as a latitude/longitude pair.

    Latitude values are in the range of [-90, 90]. Longitude values are in the range of [-180, 180].

    Declaration

    Swift

    class GeoPoint : NSObject, NSCopying

    Objective-C

    
    @interface FIRGeoPoint : NSObject <NSCopying>
  • Options for use with [FIRQuery addSnapshotListener] to control the behavior of the snapshot listener.

    Declaration

    Swift

    class QueryListenOptions : NSObject

    Objective-C

    
    @interface FIRQueryListenOptions : NSObject
  • A FIRQuery refers to a Query which you can read or listen to. You can also construct refined FIRQuery objects by adding filters and ordering.

    Declaration

    Swift

    class Query : NSObject

    Objective-C

    
    @interface FIRQuery : NSObject
  • A FIRQuerySnapshot contains zero or more FIRDocumentSnapshot objects. It can be enumerated using for … in documentSet.documents and its size can be inspected with isEmpty and count.

    Declaration

    Swift

    class QuerySnapshot : NSObject

    Objective-C

    
    @interface FIRQuerySnapshot : NSObject
  • An options object that configures the behavior of setData() calls. By providing the FIRSetOptions objects returned by merge:, the setData() methods in FIRDocumentReference, FIRWriteBatch and FIRTransaction can be configured to perform granular merges instead of overwriting the target documents in their entirety.

    Declaration

    Swift

    class SetOptions : NSObject

    Objective-C

    
    @interface FIRSetOptions : NSObject
  • Metadata about a snapshot, describing the state of the snapshot.

    Declaration

    Swift

    class FIRSnapshotMetadata : NSObject

    Objective-C

    @interface FIRSnapshotMetadata : NSObject
  • FIRTransaction provides methods to read and write data within a transaction.

    See

    FIRFirestore#transaction:completion:

    Declaration

    Swift

    class Transaction : NSObject

    Objective-C

    
    @interface FIRTransaction : NSObject
  • A write batch is used to perform multiple writes as a single atomic unit.

    A WriteBatch object can be acquired by calling [FIRFirestore batch]. It provides methods for adding writes to the write batch. None of the writes will be committed (or visible locally) until [FIRWriteBatch commit] is called.

    Unlike transactions, write batches are persisted offline and therefore are preferable when you don’t need to condition your writes on read data.

    Declaration

    Swift

    class WriteBatch : NSObject

    Objective-C

    
    @interface FIRWriteBatch : NSObject