@@ -32,10 +32,10 @@ typedef void (^FIRDocumentSnapshotBlock)(FIRDocumentSnapshot *_Nullable snapshot
32
32
NSError *_Nullable error);
33
33
34
34
/* *
35
- * A `FIRDocumentReference ` refers to a document location in a Firestore database and can be
35
+ * A `DocumentReference ` refers to a document location in a Firestore database and can be
36
36
* used to write, read, or listen to the location. The document at the referenced location
37
- * may or may not exist. A `FIRDocumentReference ` can also be used to create a
38
- * `FIRCollectionReference` to a subcollection.
37
+ * may or may not exist. A `DocumentReference ` can also be used to create a `CollectionReference` to
38
+ * a subcollection.
39
39
*/
40
40
NS_SWIFT_NAME (DocumentReference)
41
41
@interface FIRDocumentReference : NSObject
@@ -50,7 +50,7 @@ NS_SWIFT_NAME(DocumentReference)
50
50
/* * A reference to the collection to which this `DocumentReference` belongs. */
51
51
@property(nonatomic, strong, readonly) FIRCollectionReference *parent;
52
52
53
- /* * The `FIRFirestore ` for the Firestore database (useful for performing transactions, etc.). */
53
+ /* * The `Firestore ` for the Firestore database (useful for performing transactions, etc.). */
54
54
@property(nonatomic, strong, readonly) FIRFirestore *firestore;
55
55
56
56
/* *
@@ -60,35 +60,35 @@ NS_SWIFT_NAME(DocumentReference)
60
60
@property(nonatomic, strong, readonly) NSString *path;
61
61
62
62
/* *
63
- * Gets a `FIRCollectionReference ` referring to the collection at the specified
64
- * path, relative to this document.
63
+ * Gets a `CollectionReference ` referring to the collection at the specified path, relative to this
64
+ * document.
65
65
*
66
66
* @param collectionPath The slash-separated relative path of the collection for which to get a
67
- * `FIRCollectionReference `.
67
+ * `CollectionReference `.
68
68
*
69
- * @return The `FIRCollectionReference ` at the specified _collectionPath_.
69
+ * @return The `CollectionReference ` at the specified _collectionPath_.
70
70
*/
71
71
- (FIRCollectionReference *)collectionWithPath:(NSString *)collectionPath
72
72
NS_SWIFT_NAME (collection(_:));
73
73
74
74
#pragma mark - Writing Data
75
75
76
76
/* *
77
- * Writes to the document referred to by `FIRDocumentReference `. If the document doesn't yet exist,
77
+ * Writes to the document referred to by `DocumentReference `. If the document doesn't yet exist,
78
78
* this method creates it and then sets the data. If the document exists, this method overwrites
79
79
* the document data with the new values.
80
80
*
81
- * @param documentData An `NSDictionary ` that contains the fields and data to write to the
81
+ * @param documentData A `Dictionary ` that contains the fields and data to write to the
82
82
* document.
83
83
*/
84
84
- (void )setData:(NSDictionary <NSString *, id > *)documentData;
85
85
86
86
/* *
87
- * Writes to the document referred to by this DocumentReference. If the document does not yet
88
- * exist, it will be created. If you pass `merge:YES `, the provided data will be merged into
87
+ * Writes to the document referred to by this ` DocumentReference` . If the document does not yet
88
+ * exist, it will be created. If you pass `merge:true `, the provided data will be merged into
89
89
* any existing document.
90
90
*
91
- * @param documentData An `NSDictionary ` that contains the fields and data to write to the
91
+ * @param documentData A `Dictionary ` that contains the fields and data to write to the
92
92
* document.
93
93
* @param merge Whether to merge the provided data into any existing document. If enabled,
94
94
* all omitted fields remain untouched. If your input sets any field to an empty dictionary, any
@@ -105,20 +105,20 @@ NS_SWIFT_NAME(DocumentReference)
105
105
* It is an error to include a field in `mergeFields` that does not have a corresponding
106
106
* value in the `data` dictionary.
107
107
*
108
- * @param documentData An `NSDictionary ` containing the fields that make up the document
108
+ * @param documentData A `Dictionary ` containing the fields that make up the document
109
109
* to be written.
110
- * @param mergeFields An `NSArray ` that contains a list of `NSString ` or `FIRFieldPath ` elements
110
+ * @param mergeFields An `Array ` that contains a list of `String ` or `FieldPath ` elements
111
111
* specifying which fields to merge. Fields can contain dots to reference nested fields within
112
112
* the document. If your input sets any field to an empty dictionary, any nested field is
113
113
* overwritten.
114
114
*/
115
115
- (void )setData:(NSDictionary <NSString *, id > *)documentData mergeFields:(NSArray <id > *)mergeFields;
116
116
117
117
/* *
118
- * Overwrites the document referred to by this `FIRDocumentReference `. If no document exists, it
118
+ * Overwrites the document referred to by this `DocumentReference `. If no document exists, it
119
119
* is created. If a document already exists, it is overwritten.
120
120
*
121
- * @param documentData An `NSDictionary ` containing the fields that make up the document
121
+ * @param documentData A `Dictionary ` containing the fields that make up the document
122
122
* to be written.
123
123
* @param completion A block to execute once the document has been successfully written to the
124
124
* server. This block will not be called while the client is offline, though local
@@ -128,11 +128,11 @@ NS_SWIFT_NAME(DocumentReference)
128
128
completion:(nullable void (^)(NSError *_Nullable error))completion;
129
129
130
130
/* *
131
- * Writes to the document referred to by this DocumentReference. If the document does not yet
132
- * exist, it will be created. If you pass `merge:YES `, the provided data will be merged into
131
+ * Writes to the document referred to by this ` DocumentReference` . If the document does not yet
132
+ * exist, it will be created. If you pass `merge:true `, the provided data will be merged into
133
133
* any existing document.
134
134
*
135
- * @param documentData An `NSDictionary ` containing the fields that make up the document
135
+ * @param documentData A `Dictionary ` containing the fields that make up the document
136
136
* to be written.
137
137
* @param merge Whether to merge the provided data into any existing document. If your input sets
138
138
* any field to an empty dictionary, any nested field is overwritten.
@@ -153,9 +153,9 @@ NS_SWIFT_NAME(DocumentReference)
153
153
* It is an error to include a field in `mergeFields` that does not have a corresponding
154
154
* value in the `data` dictionary.
155
155
*
156
- * @param documentData An `NSDictionary ` containing the fields that make up the document
156
+ * @param documentData A `Dictionary ` containing the fields that make up the document
157
157
* to be written.
158
- * @param mergeFields An `NSArray ` that contains a list of `NSString ` or `FIRFieldPath ` elements
158
+ * @param mergeFields An `Array ` that contains a list of `String ` or `FieldPath ` elements
159
159
* specifying which fields to merge. Fields can contain dots to reference nested fields within
160
160
* the document. If your input sets any field to an empty dictionary, any nested field is
161
161
* overwritten.
@@ -168,20 +168,20 @@ NS_SWIFT_NAME(DocumentReference)
168
168
completion:(nullable void (^)(NSError *_Nullable error))completion;
169
169
170
170
/* *
171
- * Updates fields in the document referred to by this `FIRDocumentReference `.
171
+ * Updates fields in the document referred to by this `DocumentReference `.
172
172
* If the document does not exist, the update fails (specify a completion block to be notified).
173
173
*
174
- * @param fields An `NSDictionary ` containing the fields (expressed as an `NSString ` or
175
- * `FIRFieldPath `) and values with which to update the document.
174
+ * @param fields A `Dictionary ` containing the fields (expressed as an `String ` or
175
+ * `FieldPath `) and values with which to update the document.
176
176
*/
177
177
- (void )updateData:(NSDictionary <id , id > *)fields;
178
178
179
179
/* *
180
- * Updates fields in the document referred to by this `FIRDocumentReference `. If the document
180
+ * Updates fields in the document referred to by this `DocumentReference `. If the document
181
181
* does not exist, the update fails and the specified completion block receives an error.
182
182
*
183
- * @param fields An `NSDictionary ` containing the fields (expressed as an `NSString ` or
184
- * `FIRFieldPath `) and values with which to update the document.
183
+ * @param fields A `Dictionary ` containing the fields (expressed as a `String ` or
184
+ * `FieldPath `) and values with which to update the document.
185
185
* @param completion A block to execute when the update is complete. If the update is successful the
186
186
* error parameter will be nil, otherwise it will give an indication of how the update failed.
187
187
* This block will only execute when the client is online and the commit has completed against
@@ -191,14 +191,15 @@ NS_SWIFT_NAME(DocumentReference)
191
191
- (void )updateData:(NSDictionary <id , id > *)fields
192
192
completion:(nullable void (^)(NSError *_Nullable error))completion;
193
193
194
- // NOTE: this is named 'deleteDocument' because 'delete' is a keyword in Objective-C++.
195
- /* * Deletes the document referred to by this `FIRDocumentReference`. */
194
+ // NOTE: this method is named 'deleteDocument' in Objective-C because 'delete' is a keyword in
195
+ // Objective-C++.
196
+ /* * Deletes the document referred to by this `DocumentReference`. */
196
197
// clang-format off
197
198
- (void )deleteDocument NS_SWIFT_NAME (delete());
198
199
// clang-format on
199
200
200
201
/* *
201
- * Deletes the document referred to by this `FIRDocumentReference `.
202
+ * Deletes the document referred to by this `DocumentReference `.
202
203
*
203
204
* @param completion A block to execute once the document has been successfully written to the
204
205
* server. This block will not be called while the client is offline, though local
@@ -212,7 +213,7 @@ NS_SWIFT_NAME(DocumentReference)
212
213
#pragma mark - Retrieving Data
213
214
214
215
/* *
215
- * Reads the document referenced by this `FIRDocumentReference `.
216
+ * Reads the document referenced by this `DocumentReference `.
216
217
*
217
218
* This method attempts to provide up-to-date data when possible by waiting for
218
219
* data from the server, but it may return cached data or fail if you are
@@ -225,7 +226,7 @@ NS_SWIFT_NAME(DocumentReference)
225
226
NS_SWIFT_NAME (getDocument(completion:));
226
227
227
228
/* *
228
- * Reads the document referenced by this `FIRDocumentReference `.
229
+ * Reads the document referenced by this `DocumentReference `.
229
230
*
230
231
* @param source indicates whether the results should be fetched from the cache
231
232
* only (`Source.cache`), the server only (`Source.server`), or to attempt
@@ -239,23 +240,23 @@ NS_SWIFT_NAME(DocumentReference)
239
240
// clang-format on
240
241
241
242
/* *
242
- * Attaches a listener for DocumentSnapshot events.
243
+ * Attaches a listener for ` DocumentSnapshot` events.
243
244
*
244
245
* @param listener The listener to attach.
245
246
*
246
- * @return A FIRListenerRegistration that can be used to remove this listener.
247
+ * @return A `ListenerRegistration` that can be used to remove this listener.
247
248
*/
248
249
- (id <FIRListenerRegistration>)addSnapshotListener:(FIRDocumentSnapshotBlock)listener
249
250
NS_SWIFT_NAME (addSnapshotListener(_:));
250
251
251
252
/* *
252
- * Attaches a listener for DocumentSnapshot events.
253
+ * Attaches a listener for ` DocumentSnapshot` events.
253
254
*
254
255
* @param includeMetadataChanges Whether metadata-only changes (i.e. only
255
- * `FIRDocumentSnapshot .metadata` changed) should trigger snapshot events.
256
+ * `DocumentSnapshot .metadata` changed) should trigger snapshot events.
256
257
* @param listener The listener to attach.
257
258
*
258
- * @return A FIRListenerRegistration that can be used to remove this listener.
259
+ * @return A `ListenerRegistration` that can be used to remove this listener.
259
260
*/
260
261
// clang-format off
261
262
- (id <FIRListenerRegistration>)
0 commit comments