Page 1 of 1

iCloud Drive and sync

Posted: 15 January 2015, 00:52
by Benjamin Frost
I had a great trouble getting iCloud sync to work with my iMac, iPad and iPhone. Initially, I got it working for my iOS devices, but not the iMac. My solution was to create a folder in iCloud Drive called iCompta and to save the database file there. It seemed to work fine from then, and has been for several weeks. In fact, I think it was possibly a problem because I used iCloud with iCompta before Apple introduced iCloud Drive. When I tried syncing on the Mac, the sync bar never went away, as though it was getting stuck. Eventually, I toggled off the tick on the box on the Synchronisation screen, and when I turned it back on, the sync all went properly. Perhaps it got confused with the old iCloud.

Is it okay having it sync to my new folder in iCloud Drive? I presume so, as it all seems to be working quickly and reliably.

Re: iCloud Drive and sync

Posted: 15 January 2015, 11:08
by Angeman
It's OK to do it but by doing so your file is synchronized twice. It is synchronized by the Finder because the file is located in iCloud Drive and it synchronized by iCompta because you enabled iCloud synchronization in iCompta's synchronization panel. So I would suggest to move the accounts file outside of iCloud Drive and only let iCompta make the synchronization.

Re: iCloud Drive and sync

Posted: 15 January 2015, 13:47
by Benjamin Frost
Angeman wrote:It's OK to do it but by doing so your file is synchronized twice. It is synchronized by the Finder because the file is located in iCloud Drive and it synchronized by iCompta because you enabled iCloud synchronization in iCompta's synchronization panel. So I would suggest to move the accounts file outside of iCloud Drive and only let iCompta make the synchronization.

Okay. I'm worried that deleting the file in iCloud Drive will delete the other one, too, though I can back up by email, of course.

My file is 5MB. Does iCompta send 5MB each time it syncs, or is it cleverer than that?

Re: iCloud Drive and sync

Posted: 15 January 2015, 14:04
by Angeman
It zips the file before sending it to iCloud so the data sent each time is really smaller than that (less than 1MB in your case I guess).

Re: iCloud Drive and sync

Posted: 16 January 2015, 02:31
by Benjamin Frost
Aagh! I'm having a nightmare.

I started afresh, having backed up the data. Now, I can't get the Mac to receive changes via iCloud.

Here's what happens:

If I make a change on the Mac, it syncs to iPhone and iPad correctly.
If I make a change on iPhone, it syncs to iPad correctly but doesn't go to Mac.
If I make a change on iPad, it syncs to iPhone correctly, but doesn't go to Mac.

So the Mac won't receive any changes from iOS for some reason. I wondered if it’s my Mac not letting data through due to a firewall or something, but it worked fine when I had a folder directly in iCloud Drive. It’s as though the Mac is not detecting the changes. I once had a similar problem with another app, where the Mac version wouldn't always receive the changes. However, the developer has got it working reliably now. I could always put you in touch with the developer, if that would help. I use full screen; could that be a culprit?

I'm strongly inclined to go back to my method of creating a folder in iCloud Drive and saving the iCompta file there, where it seemed to sync fine.

Help would be much appreciated.

Re: iCloud Drive and sync

Posted: 16 January 2015, 10:14
by Angeman
You can put it back in iCloud Drive if it works but I can't find any logical reason to explain that ;-) Obviously iCloud is not very stable yet so I would suggest you to try Dropbox instead, it's more reliable in my experience.
Fullscreen is not related to this, that's for sure.

Re: iCloud Drive and sync

Posted: 16 January 2015, 15:53
by Benjamin Frost
Success!

I've done a serious amount of troubleshooting. About three hours unsuccessfully last night. Finally, a few minutes ago, I have solved the conundrum.

If you try to set up iCloud syncing using the default folder called iComptaMobile, it doesn't work, even though it is contained in iCloud Drive. When I saved a document there on my iMac, it wasn't recognised by my iPad Air 2 or my iPhone 5, although it showed up under the iCloud storage in Documents and Data as a 4.5MB file. So although it was uploaded to iCloud, the iOS devices weren't detecting it.

What I did was, on the Mac, move the database document to a new folder that I created in iCloud Drive. I called the folder iCompta and it showed up in the iCloud Drive folder in the Finder Sidebar. I clicked Move, and it duly moved the comtadb package there. A few minutes later, it showed up on my iPad. I loaded it, and syncing now works as it should both ways.

One quirk is that if you change the name of the document, it doesn't sync the name change; you need to manually change the name on each device.

So I will stick with this. I think you may wish to examine your set-up of the application's working with iCloud Drive. As I mentioned earlier, I do have another app that successfully syncs that still uses an 'invisible' folder like you use. However, her app went through several iterations before syncing reliably.

Another thing to note: when I moved the comptadb package, it wasn't duplicated, so it no longer resides in the iComptaMobile folder; therefore, it shouldn’t be syncing twice, but just the once in the iCloud Drive folder that I created.

Another note: I don't think it’s compressed into a zip file; the size is about 4.5MB, which I think is the uncompressed size. When I make a very small change, like adding one transaction, the sync is very quick, so if it copies the whole file, it does it very quickly. I do have a 70Mb upload connection at home.