2

I have a phonegap application which synchronizes images between a server and an iPad.

I use iOS8 (haven't been able to test on other versions yet)

I use persistent storage for these images but I noticed that my images stop showing in the following scenario (and ONLY in this scenario):

  • Step 1) Install app with iCloud turned ON.
  • Step 2) Go through the sync process

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)

  • Step 3) Update the application

All images will now no longer display.

  • 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.
  • Turning iCloud off after the images have been synced from our API server to our app won't fix it.
  • Turning iCloud off BEFORE the images get synced will not cause the bug, everything will keep working as intended.

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.

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.

I also checked the paths and there is no difference between the paths of the files when iCloud is on or off.

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).

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?

Thanks in advance!

Edit for some more info as requested:

  • 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.

  • To display images, I get the path from the WebSQL database again and display it in an tag.

Notes:

  • 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. Also note that it works when iCloud isn't turned on during the initial sync between the app and our API.
  • 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.

Another important detail: 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.

Another update: I have noticed that since activating iCloud After updating my application, the persistent storage location for my app changes which results in the files not being found anymore.

example:

  • Before update: file:///var/mobile/Containers/Data/Application/E996AB1C-C072-4D27-BBE2-AE975A7B31D2/Library/NoCloud/images/productimg/1.jpg

  • After update: file:///var/mobile/Containers/Data/Application/26C72F1D-4046-41FF-BB2F-9883756FCEA8/Library/NoCloud/images/productimg/1.jpg

KennyV
  • 832
  • 1
  • 9
  • 18
  • You should definitely provide more info about how you retrieve your images. Also, does the updated app finds an empty list of images or what? Possibly you are not syncing the images to iCloud but the image list (just a shot in the dark), wherever it be stored... – sergio Oct 16 '14 at 09:55
  • I have added some more information now, let me know if anything is still unclear – KennyV Oct 16 '14 at 10:24
  • This is similar to http://stackoverflow.com/questions/21505096/imageuri-changes-after-ios-upgrade-of-app/23501847#23501847 The suggestion I offer will work for you as well. – gro Oct 24 '14 at 23:10

0 Answers0