FIRFirestoreSettings


@interface FIRFirestoreSettings : NSObject <NSCopying>

Settings used to configure a FIRFirestore instance.

  • Creates and returns an empty FIRFirestoreSettings object.

    Declaration

    Objective-C

    - (nonnull instancetype)init;

    Return Value

    The created FIRFirestoreSettings object.

  • The hostname to connect to.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSString *_Nonnull host;
  • Whether to use SSL when connecting.

    Declaration

    Objective-C

    @property (getter=isSSLEnabled, assign, readwrite, nonatomic) BOOL sslEnabled;
  • A dispatch queue to be used to execute all completion handlers and event handlers. By default, the main queue is used.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) dispatch_queue_t _Nonnull dispatchQueue;
  • Set to false to disable local persistent storage.

    Declaration

    Objective-C

    @property (getter=isPersistenceEnabled, assign, readwrite, nonatomic)
        BOOL persistenceEnabled;
  • Enables the use of FIRTimestamps for timestamp fields in FIRDocumentSnapshots.

    Currently, Firestore returns timestamp fields as an NSDate but NSDate is implemented as a double which loses precision and causes unexpected behavior when using a timestamp from a snapshot as a part of a subsequent query.

    Setting timestampsInSnapshotsEnabled to true will cause Firestore to return FIRTimestamp values instead of NSDate, avoiding this kind of problem. To make this work you must also change any code that uses NSDate to use FIRTimestamp instead.

    NOTE: in the future timestampsInSnapshotsEnabled = true will become the default and this option will be removed so you should change your code to use FIRTimestamp now and opt-in to this new behavior as soon as you can.

    Declaration

    Objective-C

    @property (getter=areTimestampsInSnapshotsEnabled, assign, readwrite, nonatomic)
        BOOL timestampsInSnapshotsEnabled;