|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
import Cocoa |
|
|
|
import Cocoa |
|
|
|
import CoreLoggerKit |
|
|
|
import CoreLoggerKit |
|
|
|
import Firebase |
|
|
|
import FirebaseDatabase |
|
|
|
|
|
|
|
|
|
|
|
extension NSNib.Name { |
|
|
|
extension NSNib.Name { |
|
|
|
static let appFeedbackWindowIdentifier = NSNib.Name("AppFeedbackWindow") |
|
|
|
static let appFeedbackWindowIdentifier = NSNib.Name("AppFeedbackWindow") |
|
|
@ -175,15 +175,16 @@ class AppFeedbackWindowController: NSWindowController { |
|
|
|
return dateFormatter.string(from: Date()) |
|
|
|
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 { |
|
|
|
guard let identifier = serialNumber else { |
|
|
|
assertionFailure("Serial Identifier was unexpectedly nil") |
|
|
|
assertionFailure("Serial Identifier was unexpectedly nil") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let myRootReference = Firebase(url: "https://fiery-heat-5237.firebaseio.com/Feedback") |
|
|
|
firebaseDBReference = Database.database().reference() |
|
|
|
let feedbackReference = myRootReference?.child(byAppendingPath: identifier) |
|
|
|
firebaseDBReference.child("Feedback").child(identifier).setValue(info) |
|
|
|
feedbackReference?.setValue(feedbackInfo) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private func showSucccessOnSendingInfo() { |
|
|
|
private func showSucccessOnSendingInfo() { |
|
|
|