title: Phonegap - Images won't show after updating package when iCloud is on
body: <p>I have a phonegap application which synchronizes images between a server and an iPad.</p>
  
  <p>I use iOS8 (haven't been able to test on other versions yet)</p>
  
  <p>I use persistent storage for these images but I noticed that my images stop showing in the following scenario (and ONLY in this scenario):</p>
  
  <ul>
  <li>Step 1) Install app with iCloud turned ON.  </li>
  <li>Step 2) Go through the
  sync process</li>
  </ul>
  
  <p>Everything is still alright here and I can see the synced images. They are stored in the "library/NoCloud" folder (this used to be library/files but in an attempt to fix the issue I put it into the folder where iCloud shouldn't sync anything)</p>
  
  <ul>
  <li>Step 3) Update the application</li>
  </ul>
  
  <p>All images will now no longer display.</p>
  
  <ul>
  <li>Restarting the app does not cause this, it has to be an application update. Killing the application and re-opening it doesn't break anything.</li>
  <li>Turning iCloud off after the images have been synced from our API server to our app won't fix it.</li>
  <li>Turning iCloud off BEFORE the images get synced will not cause the bug, everything will keep working as intended.</li>
  </ul>
  
  <p>It seemed to me at first that iCloud was syncing the files and that my app could no longer find them, or something along those lines. But this is not the case.</p>
  
  <p>I can see in my iOS settings that the app is taking up the space it would take up with all the images, so they are still there.</p>
  
  <p>I also checked the paths and there is no difference between the paths of the files when iCloud is on or off.</p>
  
  <p>Furthermore, the steps I took were because I was suspecting iCloud of grabbing a hold of my files, though no files were ever uploaded on iCloud (I checked it online).</p>
  
  <p>Is there a known fix for this, is this a normal behavior that I overlooked, or is this a new iOS8/iCloud Drive specific bug/issue?</p>
  
  <p>Thanks in advance!</p>
  
  <p>Edit for some more info as requested:</p>
  
  <ul>
  <li><p>I get the image using FileTransfer, store it get the path of the stored file and save it in a database table that links products to images, I then
  continue to download all other images from the API and store those values like the first one.</p></li>
  <li><p>To display images, I get the path from the WebSQL database again and display it in an  tag.</p></li>
  </ul>
  
  <p>Notes:</p>
  
  <ul>
  <li><strong>Everything keeps working after restarting the application, all images are showing the way they should be. It is ONLY
  an update of the application package that causes this behavior</strong>. Also
  note that it works when iCloud isn't turned on during the initial
  sync between the app and our API.</li>
  <li>Using Weinre for debugging, I have determined that the output of the
  HTML all remains the same (paths are like they should be, everything
  in my Database and localstorage is accessible). The only thing that
  changes is that the images just will not display.</li>
  </ul>
  
  <p><strong>Another important detail:</strong>
  It seems that once iCloud has been turned on, the bug keeps persisting even with iCloud turned off, and even when you sign yourself completely out of iCloud.
  Prior to activating iCloud on our testing device, this has always worked, it was only when our client concluded that he had the bug since he activated iCloud that we activated iCloud ourselves and thus conclude that iCloud messed up our application in a seemingly irreversible way.</p>
  
  <p><strong>Another update:</strong>
  I have noticed that <strong>since activating iCloud</strong> After updating my application, the persistent storage location for my app changes which results in the files not being found anymore.</p>
  
  <p>example:</p>
  
  <ul>
  <li><p><strong>Before update</strong>: file:///var/mobile/Containers/Data/Application/E996AB1C-C072-4D27-BBE2-AE975A7B31D2/Library/NoCloud/images/productimg/1.jpg</p></li>
  <li><p><strong>After update</strong>:  file:///var/mobile/Containers/Data/Application/26C72F1D-4046-41FF-BB2F-9883756FCEA8/Library/NoCloud/images/productimg/1.jpg</p></li>
  </ul>