title: icloud drive documents not syncing instantly between devices
body: <p>I have implemented icloud drive using swift. it's code looking good as given in official document and uploading/downloading files with single device perfectly. 
  Now when going to download file on another device with same cloud user. its unable to find file in that device. now i have disabled/enabled icloud from device cloud settings after some time then tried again and its worked (now found file on that device).</p>
  
  <p>so here some questions occurs regarding this below.</p>
  
  <ul>
  <li>is icloud not sync files instantly between devices (if no, then how can we sync files on between device instantly)</li>
  <li>is there any way to notify device for sync new created files on cloud ?</li>
  <li>currently copied files to cloud document not listing on cloud.com. so how can we show/hide copied files on icloud ?</li>
  </ul>
  
  <p>here are code for upload/download files :</p>
  
  <p><strong>copy file to cloud</strong></p>
  
  <pre><code>if let cloudURL =  FileManager.default.url(forUbiquityContainerIdentifier: nil)?.appendingPathComponent("Documents") {
    let file = cloudURL.appendingPathComponent("file.txt")
    if (FileManager.default.fileExists(atPath: file.path, isDirectory: nil)) {
      do{
        try FileManager.default.removeItem(at: file)
      }catch let error as NSError {
        print("error",error)
      }
    }
  
    let localDocumentsURL = DocumentsDirectory.localDocumentsURL.appendingPathComponent("file.txt")
    do {
      try FileManager.default.copyItem(at: localDocumentsURL, to: file)
  
    } catch let error as NSError{
      print("can not copy file",error)
    }
  }
  </code></pre>
  
  <p><strong>download file from cloud directory</strong></p>
  
  <pre><code>let fileManager = FileManager.default
      if let cloudURL = fileManager.url(forUbiquityContainerIdentifier: nil)?.appendingPathComponent("Documents") {
        let file = cloudURL.appendingPathComponent("file.txt")
        do{
          var downloded = false
          try fileManager.startDownloadingUbiquitousItem(at: file)
          while(!downloded){
            if(fileManager.fileExists(atPath: file.path, isDirectory: nil)){
              downloded = true
            }
          }
          let filePath = DocumentsDirectory.localDocumentsURL.appendingPathComponent("file.txt")
          try fileManager.copyItem(at: file, to: filePath)
        }catch let error as NSError {
          print("error",error)
        }
      }
  </code></pre>