Skip to content

Commit a4be536

Browse files
authored
Update changelog (#9566)
1 parent ecc4ef3 commit a4be536

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Firestore/Swift/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
# v8.13.0
66
- [added] Added support for explicit typing to `DocumentReference.getDocument(as:)`
77
and `DocumentSnapshot.data(as:)` to simplify mapping documents (#9101).
8+
- [changed] `DocumentSnapshot.data(as:)` will decode the document to the type
9+
provided. If you expect that a document might *not exist*, use an optional
10+
type (e.g. `Book?.self`) to account for this. See
11+
[the documentation](https://firebase.google.com/docs/firestore/query-data/get-data#custom_objects)
12+
and this [blog post](https://peterfriese.dev/posts/firestore-codable-the-comprehensive-guide/#mapping-simple-types-using-codable)
13+
for an in-depth discussion.
814

915
# 8.12.1
1016
- [added] Added async wrapper for `CollectionReference.addDocument()` and

0 commit comments

Comments
 (0)