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/Source/Public/FIRWriteBatch.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Firestore/Source/Public') diff --git a/Firestore/Source/Public/FIRWriteBatch.h b/Firestore/Source/Public/FIRWriteBatch.h index 5f0034c..8ff1bec 100644 --- a/Firestore/Source/Public/FIRWriteBatch.h +++ b/Firestore/Source/Public/FIRWriteBatch.h @@ -92,6 +92,11 @@ NS_SWIFT_NAME(WriteBatch) - (FIRWriteBatch *)deleteDocument:(FIRDocumentReference *)document NS_SWIFT_NAME(deleteDocument(_:)); +/** + * Commits all of the writes in this write batch as a single atomic unit. + */ +- (void)commit; + /** * Commits all of the writes in this write batch as a single atomic unit. * @@ -101,7 +106,7 @@ NS_SWIFT_NAME(WriteBatch) * completion handler will not be called when the device is offline, though local * changes will be visible immediately. */ -- (void)commitWithCompletion:(void (^)(NSError *_Nullable error))completion; +- (void)commitWithCompletion:(nullable void (^)(NSError *_Nullable error))completion; @end -- cgit v1.2.3