Skip to content

Instantly share code, notes, and snippets.

@ziyang0621
Created December 3, 2015 22:50
Show Gist options
  • Save ziyang0621/a2ccd968b26eea6a05cf to your computer and use it in GitHub Desktop.
Save ziyang0621/a2ccd968b26eea6a05cf to your computer and use it in GitHub Desktop.
import Cocoa
class ViewController: NSViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
Firebase.defaultConfig().persistenceEnabled = true
let ref = Firebase(url: "https://<YOUR_NAME_SPACE>.firebaseio.com/")
ref.setValue("new-OSX") { (error, firebase) -> Void in
print("call back")
}
}
override var representedObject: AnyObject? {
didSet {
// Update the view, if already loaded.
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment