@FirestoreQuery property wrapper.CollectionReference.addDocument(data:) API now returns
a discardable result. (#10640)Data types as an NSData
blob instead of a String.blob DataEncodingStrategy for Codables with Data types.DocumentID constructor from a
DocumentReference is now internal; this does not affect instantiating a
@DocumentID property wrapper for a DocumentReference. (#9368)@DocumentID property wrapper's
constructor or setter will log a warning and the set value will be ignored.
(#9368)Firestore.Encoder and Firestore.Decoder now wraps the shared
FirebaseDataEncoder and FirebaseDataDecoder types, which provides new
customization options for encoding and decoding data to and from Firestore
into Codables - similar to the options present on JSONEncoder and
JSONDecoder from Foundation.FirebaseDataEncoder.DateEncodingStrategy for Timestamps.FirebaseFirestoreSwift has exited beta and is
now generally available for use.DocumentReference.getDocument(as:)
and DocumentSnapshot.data(as:) to simplify mapping documents (#9101).DocumentSnapshot.data(as:) will decode the document to the type
provided. If you expect that a document might not exist, use an optional
type (e.g. Book?.self) to account for this. See
the documentation
and this blog post
for an in-depth discussion.CollectionReference.addDocument() and
Firestore.loadBundle().@FirestoreQuery property wrapper for querying data from a
Firestore collection.ServerTimestampBehavior when
decoding a DocumentSnapshot.[feature] Added conditional conformance to the Hashable protocol for the
@DocumentID, @ExplicitNull, and @ServerTimestamp property wrappers.
[fixed] Removed support for wrapping NSDate in a @ServerTimestamp
property wrapper. This never actually worked because NSDate is not
Codable.
[fixed] Fixed the minimum supported Swift version to be 4.1. This was already effectively the case because the code made use of Swift 4.1 features without documenting this requirement.
FirestoreDecodingError.fieldNameConfict to
fieldNameConflict (#5520).