FIRSnapshotListenOptions
@interface FIRSnapshotListenOptions : NSObjectOptions to configure the behavior of Firestore.addSnapshotListenerWithOptions(). Instances
of this class control settings like whether metadata-only changes trigger events and the
preferred data source.
-
The source the snapshot listener retrieves data from.
Declaration
Objective-C
@property (nonatomic, readonly) FIRListenSource source; -
Indicates whether metadata-only changes should trigger snapshot events.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL includeMetadataChanges; -
Creates and returns a new
SnapshotListenOptionsobject with all properties initialized to their default values.Declaration
Objective-C
- (nonnull instancetype)init;Return Value
The created
SnapshotListenOptionsobject. -
Creates and returns a new
SnapshotListenOptionsobject with all properties of the currentSnapshotListenOptionsobject plus the new property specifying whether metadata-only changes should trigger snapshot eventsDeclaration
Objective-C
- (nonnull FIRSnapshotListenOptions *)optionsWithIncludeMetadataChanges: (BOOL)includeMetadataChanges;Return Value
The created
SnapshotListenOptionsobject. -
Creates and returns a new
SnapshotListenOptionsobject with all properties of the currentSnapshotListenOptionsobject plus the new property specifying the source that the snapshot listener listens to.Declaration
Objective-C
- (nonnull FIRSnapshotListenOptions *)optionsWithSource:(FIRListenSource)source;Return Value
The created
SnapshotListenOptionsobject.