title: Unable to write data to Firebase real-time database with Swift 4
body: <p>I have installed Firebase/Database in my cocoa pods, configured it in my AppDelegate, imported my Google plist, turned the read and write permission to true, and in viewDidLoad(), I wrote</p>
  
  <pre><code>let rootRef = Database.database().reference()
  rootRef.child("users").setValue(["name": "Ryan"])
  
  rootRef.child("users").observe(.value) { (snapshot) in
      print(snapshot)
  }
  </code></pre>
  
  <p>The thing is, it prints out the </p>
  
  <pre><code>Snap (users) {
      username = Ryan;
  }
  </code></pre>
  
  <p>However, I don't see the change in my real-time database, so if I get rid of </p>
  
  <pre><code>rootRef.child("users").setValue(["name": "Ryan"])
  </code></pre>
  
  <p>and rerun the program, nothing comes out.</p>
  
  <p>In my database, if I add a key-value pair under my root directory, like "Yo": "hey"<a href="https://i.stack.imgur.com/Bn7WN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Bn7WN.png" alt="enter image description here"></a></p>
  
  <p>And do an observe event with </p>
  
  <pre><code>rootRef.child("yo").observe(.value) { (snapshot) in
      print(snapshot)
  }
  </code></pre>
  
  <p>Nothing comes out again</p>
  
  <p>I am pretty sure my firebase service is connected because my user authentication works, but my database doesn't. Can someone please help me!</p>