title: How to watch changement of firebase storage and update the viewcontroller on real time?
body: <p>I'm building an app where a user can update his profile picture using firebase services (firebase storage).</p>
  
  <p>In my app user can have multiple friends, and pictures of his friends is displayed in a view controller.</p>
  
  <p>What I want to achieve is that when user updates his profile picture all his friends (connected using other devices) get his image changed in a real time.</p>
  
  <p>For that I believe that the easiest solution is to watch the changes in the storage.</p>
  
  <p>Here is the code I used to upload the user image </p>
  
  <pre><code> let storage = FIRStorage.storage()
                      let storageref = storage.reference(forURL: "my firebase url")
                      let imageref = storageref.child("images")
                      let userid : String = (user.uid)
                      let spaceref = imageref.child("\(userid).jpg")
  
                      let imageConverter = ImageConverter()
                      var profilePicture : UIImage = imageConverter.cropToBounds(image: self.profilePicture.image!, width: 150 ,height: 150)
                      profilePicture = imageConverter.resizeImage(image: profilePicture, targetSize: CGSize(width: 140, height: 150))
                      let imageData = UIImagePNGRepresentation(profilePicture)
                      _ = spaceref.put(imageData!, metadata: nil){ metadata, error in
                          if (error != nil) {
                              loadingScreenViewController.view.removeFromSuperview()
                              self.alert(title: "Error", description: "please check your internet connection and try again")
                          }
                          else {
                              _ = metadata!.downloadURL
                          }
  
                      loadingScreenViewController.view.removeFromSuperview()
  </code></pre>
  
  <p>Does anyone have an idea about how to watch changement in firebase storage.</p>
  
  <p>I get the image simply by using </p>
  
  <pre><code>let imageRef = storage.child("images/\(friendsManager.friends[indexPath.row].id).jpg")
  </code></pre>