From 54ba423c87d6e0a409e4fa3dc95cd81ca16b97f7 Mon Sep 17 00:00:00 2001 From: zxu Date: Mon, 11 Dec 2017 15:37:01 -0500 Subject: Revisit commit method in FIRWriteBatch (#541) * revisit FIRWriteBatch commit * make commitWithCompletion completion nullable; * add commit; * add unit test; * add swift build test for commit; * update CHANGELOG. --- Firestore/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) (limited to 'Firestore/CHANGELOG.md') diff --git a/Firestore/CHANGELOG.md b/Firestore/CHANGELOG.md index 32cbbfc..1a8eb07 100644 --- a/Firestore/CHANGELOG.md +++ b/Firestore/CHANGELOG.md @@ -2,6 +2,7 @@ - [changed] Firestore no longer has a direct dependency on FirebaseAuth. - [changed] Removed the includeMetadataChanges property in FIRDocumentListenOptions to avoid confusion with the factory method of the same name. +- [changed] Added a commit method that takes no completion handler to FIRWriteBatch. - [fixed] Fixed a crash when using path names with international characters with persistence enabled. -- cgit v1.2.3 From 43774fec33adda895609ccd61d7c00e71d2396bb Mon Sep 17 00:00:00 2001 From: Gil Date: Mon, 11 Dec 2017 14:14:05 -0800 Subject: Update CHANGELOG for Firestore v0.9.4 (#556) --- Firestore/CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Firestore/CHANGELOG.md') diff --git a/Firestore/CHANGELOG.md b/Firestore/CHANGELOG.md index 0c5bcdc..ae9f994 100644 --- a/Firestore/CHANGELOG.md +++ b/Firestore/CHANGELOG.md @@ -1,8 +1,9 @@ # Unreleased + +# v0.9.4 - [changed] Firestore no longer has a direct dependency on FirebaseAuth. - [fixed] Fixed a crash when using path names with international characters with persistence enabled. - - [fixed] Addressed race condition during the teardown of idle streams (#490). # v0.9.3 -- cgit v1.2.3 From 5b1ca51e7264b5ac581c7a0382beb44ed65bdf14 Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Tue, 12 Dec 2017 07:11:39 +0800 Subject: Addressing comments --- Firestore/CHANGELOG.md | 4 ++++ .../Tests/Integration/API/FIRServerTimestampTests.m | 6 +++--- Firestore/Example/Tests/Util/FSTEventAccumulator.h | 4 ++-- Firestore/Source/Model/FSTFieldValue.h | 4 ++-- Firestore/Source/Public/FIRDocumentSnapshot.h | 14 +++++++------- 5 files changed, 18 insertions(+), 14 deletions(-) (limited to 'Firestore/CHANGELOG.md') diff --git a/Firestore/CHANGELOG.md b/Firestore/CHANGELOG.md index 0c5bcdc..fa2010b 100644 --- a/Firestore/CHANGELOG.md +++ b/Firestore/CHANGELOG.md @@ -1,3 +1,7 @@ +# Firestore API Branch +- [added] Added SnapshotOptions API to control how DocumentSnapshots return unresolved + server timestamps. + # Unreleased - [changed] Firestore no longer has a direct dependency on FirebaseAuth. - [fixed] Fixed a crash when using path names with international characters diff --git a/Firestore/Example/Tests/Integration/API/FIRServerTimestampTests.m b/Firestore/Example/Tests/Integration/API/FIRServerTimestampTests.m index f2ae687..da3c03c 100644 --- a/Firestore/Example/Tests/Integration/API/FIRServerTimestampTests.m +++ b/Firestore/Example/Tests/Integration/API/FIRServerTimestampTests.m @@ -16,8 +16,6 @@ @import FirebaseFirestore; -#import -#import #import #import "Firestore/Example/Tests/Util/FSTEventAccumulator.h" @@ -128,7 +126,9 @@ [self expectedDataWithTimestamp:timestamp]); } -/** Verifies a snapshot containing _setData but using the previous field value for the timestamps. +/** + * Verifies a snapshot containing _setData but using the previous field value for server + * timestamps. */ - (void)verifyTimestampsInSnapshot:(FIRDocumentSnapshot *)snapshot fromPreviousSnapshot:(nullable FIRDocumentSnapshot *)previousSnapshot { diff --git a/Firestore/Example/Tests/Util/FSTEventAccumulator.h b/Firestore/Example/Tests/Util/FSTEventAccumulator.h index e32f08b..424f4c8 100644 --- a/Firestore/Example/Tests/Util/FSTEventAccumulator.h +++ b/Firestore/Example/Tests/Util/FSTEventAccumulator.h @@ -23,8 +23,8 @@ NS_ASSUME_NONNULL_BEGIN -typedef void (^FSTValueEventHandler)(id _Nullable, NSError *error); -typedef void (^FSTErrorEventHandler)(NSError *error); +typedef void (^FSTValueEventHandler)(id _Nullable, NSError *_Nullable error); +typedef void (^FSTErrorEventHandler)(NSError *_Nullable error); @interface FSTEventAccumulator : NSObject diff --git a/Firestore/Source/Model/FSTFieldValue.h b/Firestore/Source/Model/FSTFieldValue.h index 9b715a2..93fd5c4 100644 --- a/Firestore/Source/Model/FSTFieldValue.h +++ b/Firestore/Source/Model/FSTFieldValue.h @@ -44,9 +44,9 @@ typedef NS_ENUM(NSInteger, FSTTypeOrder) { /** Defines the return value for pending server timestamps. */ typedef NS_ENUM(NSInteger, FSTServerTimestampBehavior) { + FSTServerTimestampBehaviorNone, FSTServerTimestampBehaviorEstimate, - FSTServerTimestampBehaviorPrevious, - FSTServerTimestampBehaviorNone + FSTServerTimestampBehaviorPrevious }; /** Holds properties that define field value deserialization options. */ diff --git a/Firestore/Source/Public/FIRDocumentSnapshot.h b/Firestore/Source/Public/FIRDocumentSnapshot.h index e8e73c9..994cabf 100644 --- a/Firestore/Source/Public/FIRDocumentSnapshot.h +++ b/Firestore/Source/Public/FIRDocumentSnapshot.h @@ -26,6 +26,12 @@ NS_ASSUME_NONNULL_BEGIN * their final value. */ typedef NS_ENUM(NSInteger, FIRServerTimestampBehavior) { + /** + * Return `NSNull` for `FieldValue.serverTimestamp()` fields that have not yet + * been set to their final value. + */ + FIRServerTimestampBehaviorNone, + /** * Return a local estimates for `FieldValue.serverTimestamp()` * fields that have not yet been set to their final value. This estimate will @@ -38,13 +44,7 @@ typedef NS_ENUM(NSInteger, FIRServerTimestampBehavior) { * Return the previous value for `FieldValue.serverTimestamp()` fields that * have not yet been set to their final value. */ - FIRServerTimestampBehaviorPrevious, - - /** - * Return `NSNull` for `FieldValue.serverTimestamp()` fields that have not yet - * been set to their final value. - */ - FIRServerTimestampBehaviorNone + FIRServerTimestampBehaviorPrevious }; /** -- cgit v1.2.3 From b8714e3b8977567c7bd7b83163045d145be9ebb5 Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Tue, 12 Dec 2017 08:04:50 +0800 Subject: Moving changelog --- Firestore/CHANGELOG.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Firestore/CHANGELOG.md') diff --git a/Firestore/CHANGELOG.md b/Firestore/CHANGELOG.md index e6e3610..b8de1e9 100644 --- a/Firestore/CHANGELOG.md +++ b/Firestore/CHANGELOG.md @@ -1,12 +1,10 @@ -# Firestore API Branch -- [added] Added SnapshotOptions API to control how DocumentSnapshots return unresolved - server timestamps. - # Unreleased - [changed] Removed the includeMetadataChanges property in FIRDocumentListenOptions to avoid confusion with the factory method of the same name. - [changed] Added a commit method that takes no completion handler to FIRWriteBatch. - [feature] Queries can now be created from an NSPredicate. +- [added] Added SnapshotOptions API to control how DocumentSnapshots return unresolved + server timestamps. # v0.9.4 - [changed] Firestore no longer has a direct dependency on FirebaseAuth. -- cgit v1.2.3