aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/API/FIRFirestore.mm
diff options
context:
space:
mode:
Diffstat (limited to 'Firestore/Source/API/FIRFirestore.mm')
-rw-r--r--Firestore/Source/API/FIRFirestore.mm52
1 files changed, 26 insertions, 26 deletions
diff --git a/Firestore/Source/API/FIRFirestore.mm b/Firestore/Source/API/FIRFirestore.mm
index 5486b75..0ed9082 100644
--- a/Firestore/Source/API/FIRFirestore.mm
+++ b/Firestore/Source/API/FIRFirestore.mm
@@ -34,7 +34,6 @@
#import "Firestore/Source/Core/FSTFirestoreClient.h"
#import "Firestore/Source/Util/FSTAssert.h"
#import "Firestore/Source/Util/FSTDispatchQueue.h"
-#import "Firestore/Source/Util/FSTLogger.h"
#import "Firestore/Source/Util/FSTUsageValidation.h"
#include "Firestore/core/src/firebase/firestore/auth/credentials_provider.h"
@@ -42,6 +41,7 @@
#include "Firestore/core/src/firebase/firestore/core/database_info.h"
#include "Firestore/core/src/firebase/firestore/model/database_id.h"
#include "Firestore/core/src/firebase/firestore/model/resource_path.h"
+#include "Firestore/core/src/firebase/firestore/util/log.h"
#include "Firestore/core/src/firebase/firestore/util/string_apple.h"
#include "absl/memory/memory.h"
@@ -246,31 +246,31 @@ extern "C" NSString *const FIRFirestoreErrorDomain = @"FIRFirestoreErrorDomain";
FSTAssert(_settings.dispatchQueue, @"FirestoreSettings.dispatchQueue cannot be nil.");
if (!_settings.timestampsInSnapshotsEnabled) {
- FSTWarn(
- @"The behavior for system Date objects stored in Firestore is going to change "
- "AND YOUR APP MAY BREAK.\n"
- "To hide this warning and ensure your app does not break, you need to add "
- "the following code to your app before calling any other Cloud Firestore methods:\n"
- "\n"
- "let db = Firestore.firestore()\n"
- "let settings = db.settings\n"
- "settings.areTimestampsInSnapshotsEnabled = true\n"
- "db.settings = settings\n"
- "\n"
- "With this change, timestamps stored in Cloud Firestore will be read back as "
- "Firebase Timestamp objects instead of as system Date objects. So you will "
- "also need to update code expecting a Date to instead expect a Timestamp. "
- "For example:\n"
- "\n"
- "// old:\n"
- "let date: Date = documentSnapshot.get(\"created_at\") as! Date\n"
- "// new:\n"
- "let timestamp: Timestamp = documentSnapshot.get(\"created_at\") as! Timestamp\n"
- "let date: Date = timestamp.dateValue()\n"
- "\n"
- "Please audit all existing usages of Date when you enable the new behavior. In a "
- "future release, the behavior will be changed to the new behavior, so if you do not "
- "follow these steps, YOUR APP MAY BREAK.");
+ LOG_WARN(
+ "The behavior for system Date objects stored in Firestore is going to change "
+ "AND YOUR APP MAY BREAK.\n"
+ "To hide this warning and ensure your app does not break, you need to add "
+ "the following code to your app before calling any other Cloud Firestore methods:\n"
+ "\n"
+ "let db = Firestore.firestore()\n"
+ "let settings = db.settings\n"
+ "settings.areTimestampsInSnapshotsEnabled = true\n"
+ "db.settings = settings\n"
+ "\n"
+ "With this change, timestamps stored in Cloud Firestore will be read back as "
+ "Firebase Timestamp objects instead of as system Date objects. So you will "
+ "also need to update code expecting a Date to instead expect a Timestamp. "
+ "For example:\n"
+ "\n"
+ "// old:\n"
+ "let date: Date = documentSnapshot.get(\"created_at\") as! Date\n"
+ "// new:\n"
+ "let timestamp: Timestamp = documentSnapshot.get(\"created_at\") as! Timestamp\n"
+ "let date: Date = timestamp.dateValue()\n"
+ "\n"
+ "Please audit all existing usages of Date when you enable the new behavior. In a "
+ "future release, the behavior will be changed to the new behavior, so if you do not "
+ "follow these steps, YOUR APP MAY BREAK.");
}
const DatabaseInfo database_info(*self.databaseID, util::MakeStringView(_persistenceKey),