From d48e591493c82730b27a3c438d89133bcc8e798a Mon Sep 17 00:00:00 2001 From: Abhishek Date: Mon, 5 Jul 2021 14:55:15 -0400 Subject: [PATCH] Onboard new Firebase. --- .../App Feedback/AppFeedbackWindowController.swift | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Clocker/Preferences/App Feedback/AppFeedbackWindowController.swift b/Clocker/Preferences/App Feedback/AppFeedbackWindowController.swift index 316eae6..abe1b8e 100644 --- a/Clocker/Preferences/App Feedback/AppFeedbackWindowController.swift +++ b/Clocker/Preferences/App Feedback/AppFeedbackWindowController.swift @@ -2,7 +2,7 @@ import Cocoa import CoreLoggerKit -import Firebase +import FirebaseDatabase extension NSNib.Name { static let appFeedbackWindowIdentifier = NSNib.Name("AppFeedbackWindow") @@ -175,15 +175,16 @@ class AppFeedbackWindowController: NSWindowController { return dateFormatter.string(from: Date()) } - private func sendDataToFirebase(feedbackInfo: [String: String]) { + var firebaseDBReference: DatabaseReference! + + private func sendDataToFirebase(feedbackInfo info: [String: String]) { guard let identifier = serialNumber else { assertionFailure("Serial Identifier was unexpectedly nil") return } - let myRootReference = Firebase(url: "https://fiery-heat-5237.firebaseio.com/Feedback") - let feedbackReference = myRootReference?.child(byAppendingPath: identifier) - feedbackReference?.setValue(feedbackInfo) + firebaseDBReference = Database.database().reference() + firebaseDBReference.child("Feedback").child(identifier).setValue(info) } private func showSucccessOnSendingInfo() {