diff --git a/packages/firestore/ios/Plugin/FirebaseFirestoreHelper.swift b/packages/firestore/ios/Plugin/FirebaseFirestoreHelper.swift index cf94c9ab..9cf04cde 100644 --- a/packages/firestore/ios/Plugin/FirebaseFirestoreHelper.swift +++ b/packages/firestore/ios/Plugin/FirebaseFirestoreHelper.swift @@ -64,6 +64,9 @@ public class FirebaseFirestoreHelper { guard let value = value else { return nil } + if let value = value as? Timestamp { + return value.dateValue() + } guard let value = JSTypes.coerceDictionaryToJSObject(["key": value]) as JSObject? else { return nil } diff --git a/packages/firestore/ios/Plugin/FirebaseFirestorePlugin.swift b/packages/firestore/ios/Plugin/FirebaseFirestorePlugin.swift index 08ebea6e..5e2df76f 100644 --- a/packages/firestore/ios/Plugin/FirebaseFirestorePlugin.swift +++ b/packages/firestore/ios/Plugin/FirebaseFirestorePlugin.swift @@ -15,6 +15,7 @@ public class FirebaseFirestorePlugin: CAPPlugin { private var pluginCallMap: [String: CAPPluginCall] = [:] override public func load() { + self.shouldStringifyDatesInCalls = false self.implementation = FirebaseFirestore(plugin: self) }