1

I've recently decided to add iCloud functionality to my iOS app and I'm having a lot of trouble with it.

Using Romain's answer to this question, I have successfully been able to upload a JSON file to iCloud. However, here is my problem:

The Scenario

1) I have two devices which are able to upload a JSON file to iCloud.

2) I upload the JSON file to iCloud with Device A

3) I run the app on Device B, but the ubiquitous iCloud directory on Device B is empty and therefore it cannot load the file

My Question

In the background should iCloud be automatically downloading the JSON file into this directory, or do I have to call a function within the app to download it?

Community
  • 1
  • 1
  • If both devices are logged into the same iCloud account than the file should appear/be available on both. – user3069232 Jan 06 '17 at 08:04
  • In the Settings app, when I go to the "Manage Storage" screen both devices show my app name and 3.5kb of storage used, but the directory is empty when I access it via code. –  Jan 06 '17 at 11:11
  • Download Apple's iCloud Drive app from the Apple Store and check your on the same page. Make sure the save you think is going into the ubiquitous Cloud container is indeed going into that container and indeed the view your looking at on device B is also the ubiquitous drive. – user3069232 Jan 06 '17 at 15:12
  • also make sure you do use synchronize() method before trying to access the storage on 2nd device. also i read that sometimes it might take few mins to get to the icloud – Tung Fam Jan 08 '17 at 21:31

0 Answers0