title: Retrieve data from new Firebase (Database)
body: <p>I can't retrieve data from new Firebase. After I touch to button (act()) nothing changes. I check all settings and read all documentations in Firebase web-site, but I can not understand why nothing is happening.</p>
  
  <pre><code>    import UIKit
  import Firebase
  
  var ref = FIRDatabaseReference.init()
  
  class MainTovarViewController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource {
  @IBOutlet weak var collectionView: UICollectionView!
  var items = [FIRDataSnapshot]()
  override func viewDidAppear(animated: Bool) {
  
  }
  override func viewDidLoad() {
      super.viewDidLoad()
      ref = FIRDatabase.database().reference()
  
  }
  
  
  @IBAction func act(sender: AnyObject) {
      ref.observeEventType(FIRDataEventType.Value) { (snapshot: FIRDataSnapshot!) in
  
          var newItems = [FIRDataSnapshot]()
          for item in snapshot.children {
              newItems.append(item as! FIRDataSnapshot)
          }
  
          self.items = newItems
          print("\(self.items)")
          self.collectionView!.reloadData()
      }
  }
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
  }
  
  func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
      var result = 0
      if items.count != 0 {
          result = items.count
      }
      return result
  }
  
  func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -&gt; UICollectionViewCell {
      let cell = collectionView.dequeueReusableCellWithReuseIdentifier("MainTovarCollectionCell", forIndexPath: indexPath) as! MainTovarCollectionCellCollectionViewCell
      cell.backgroundView = UIImageView(image: UIImage(named: "product_1"))
      cell.titletovar.text = items[indexPath.row].value!.objectForKey("TovarName") as! String
  
      return cell
  }
  
  }
  </code></pre>
  
  <p>And this:</p>
  
  <pre><code>2016-05-21 10:55:38.340 shoroo[95390:14237917] WARNING: Firebase 
  
  Analytics App Delegate Proxy is disabled. To log deep link campaigns manually, call the methods in FIRAnalytics+AppDelegate.h.
  2016-05-21 10:55:38.510 shoroo[95390:14237917] Configuring the default app.
  2016-05-21 10:55:38.522 shoroo[95390:] &lt;FIRAnalytics/INFO&gt; Firebase Analytics v.3200000 started
  2016-05-21 10:55:38.523 shoroo[95390:] &lt;FIRAnalytics/INFO&gt; To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled
  2016-05-21 10:55:38.529: &lt;FIRInstanceID/WARNING&gt; Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null)"
  2016-05-21 10:55:38.533: &lt;FIRMessaging/INFO&gt; FIRMessaging library version 1.1.0
  2016-05-21 10:55:38.564 shoroo[95390:] &lt;FIRAnalytics/INFO&gt; Firebase Analytics enabled
  Error Domain=NSCocoaErrorDomain Code=3010 "REMOTE_NOTIFICATION_SIMULATOR_NOT_SUPPORTED_NSERROR_DESCRIPTION" UserInfo={NSLocalizedDescription=REMOTE_NOTIFICATION_SIMULATOR_NOT_SUPPORTED_NSERROR_DESCRIPTION}
  </code></pre>