From a17740e9146e4e2431d62964d044287cccc3ee85 Mon Sep 17 00:00:00 2001 From: Konstantin Varlamov Date: Fri, 30 Mar 2018 14:50:15 -0400 Subject: Add a flag to control whether DocumentSnapshots return Dates or Timestamps for timestamp fields (#831) * add a new property `timestampsInSnapshotsEnabled` to `FirestoreSettings`, `false` by default; * add a verbose warning message urging users to opt into the new behavior; * set `timestampsInSnapshotsEnabled` to true in the integration tests to reduce the verbose console spam during the test run and make sure the flag won't break anything once it's flipped. --- Firestore/Source/Remote/FSTSerializerBeta.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Firestore/Source/Remote') diff --git a/Firestore/Source/Remote/FSTSerializerBeta.mm b/Firestore/Source/Remote/FSTSerializerBeta.mm index 9531ddc..3a22a3f 100644 --- a/Firestore/Source/Remote/FSTSerializerBeta.mm +++ b/Firestore/Source/Remote/FSTSerializerBeta.mm @@ -191,7 +191,7 @@ NS_ASSUME_NONNULL_BEGIN return [self encodedString:[fieldValue value]]; } else if (fieldClass == [FSTTimestampValue class]) { - return [self encodedTimestampValue:((FSTTimestampValue *)fieldValue).internalValue]; + return [self encodedTimestampValue:[fieldValue value]]; } else if (fieldClass == [FSTGeoPointValue class]) { return [self encodedGeoPointValue:[fieldValue value]]; -- cgit v1.2.3