title: NSMetadataQuery doesn't find iCloud files
body: <p>I used as described in the Apple Docs NSMetadataQuery to search my iCloud file. I have only one file and I know its name. My problem is that sometimes this file doesn't exist (I guess because it has not yet been downloaded) and NSMetadataQuery is unable to find it.</p>
  
  <p>Ever tried to force download with <code>NSFileManager startDownloadingUbiquitousItemAtURL:error:</code> and it returns me an error. (Read EDIT)</p>
  
  <p>My solution is that I created the file the first time, then I guess it exists and I open it with UIDocument. But It couldn't exist or it could be the first time the user opens the app. I can't be sure of these things. My first question is: if UIDocument opens the file, it means that it found the file somewhere. How could it use the file if it DOESN'T EXIST?</p>
  
  <p>And then, second question: If I app which has to manage multiple files or files with unknown name. How can I find them if NSMetadataQuery doesn't work.</p>
  
  <p><strong>EDIT:</strong>
  if <code>startDownloadingUbiquitousItemAtURL</code> should be used to start downloading a file, how can I know when the file finished downloading (perhaps with a notification)? But, a more important thing: How can I download the file if is always says (removed original names)?</p>
  
  <pre><code>   Error Domain=NSPOSIXErrorDomain Code=2 "The operation couldn’t be completed.
      No such file or directory" UserInfo=0x166cb0 {
      NSDescription=Unable to get real path for Path
  '/private/var/mobile/Library/Mobile Documents/teamid~com~team~app/Documents/file.extension'
      }
  </code></pre>