Why not iCloud Sync?

I have only apple devices and I am using them regularly. Syncing is such a pain when I switch device during the day. Please make it happen. It is not hard just open a folder in icloud drive and prefer to look there first when I am using any apple devices?

TL;DR Unfortunately, this wouldn’t be an improvement.

There are two ways a user can experience a sync system: either the syncing is completely automated, or it has to be (more or less) manually triggered. For instance, if you turn on icloud sync, you usually don’t even need to actually trigger the sync. When a file is modified, it will automatically gets synced. This is possible because it will assume your are only modifying the file at one location: for each device, either you are modifying the file on this device, so these modifications get pushed to the cloud, and every other device pulls that modification, or you are receiving a modification from the cloud. In any case, it will assume instant feedback: if a file is modified somewhere, it will propagate to every other device before you can actually modify that file somewhere else.
On the other hand, you have the manually-triggered sync systems (which actually don’t necessarily need to be manually triggered, as in the case of Anki). These are useful when you can’t assume you are always editing the most recent version of a file, as multiple version might coexist at a certain moment on multiple device, before synchronization, and the user might modify all of them. To solve this issue, these sync system also include a stronger merge mechanism: if you have two versions of a file, but there is not one that is clearly a fast-forward of the other, you can still sometimes merge the two files in a sensible way. However, it is not the case in general: when the merge can’t be automated, something else has to be done. Most vc system allow you more granular, hand-tuned merge for these cases; Anki, for now, just asks you which version to keep, and which one to delete. This might not be very satisfying, but keep in mind that:

  • Anki’s database is quite complex;
  • synchronization is a very complex topic, with tens of years of worldwide research. There is no easy solution.

I don’t know all the reasons why Anki cannot make the instant feedback assumption, but at least one very good I can think of right now is the fact that you can use Anki while being offline. As soon as that feature is enabled, you can’t assume instant feedback. iCould also allows synchronization when modifying while being offline, but the underlying data is very different. Most iPhone users while sync, say, their pictures, and won’t modify these often. This means that each file will most likely one be synced once, and it will almost never require a merge to be done. On the other hand, Anki’s database is a single file, which will be modified every single time you use Anki (by “using Anki” I mean reviewing or creating, editing or deleting content from your collection), requiring merges very often.
This is usually not a problem for Anki, because Anki’s merge system (when it achieves to do so) if fine-tuned for Anki’s database, meaning that it will be very smart about how to merge reviews, whereas a generic merger that only sees Anki’s database as a binary blob will struggle being smart about it.

For this technical reason, what you are asking would be extremely hard, if not impossible, to implement through iCould and get at least the same results as with Anki. Let alone having something better.

However, not everything is lost. If you can actually pin what are the aspects of Anki’s synchronization you find less ergonomic, and post them here, it may be possible to improve these points.

2 Likes

Anki is furthermore available for different platforms (Windows, Mac, Linux, iOS/iPadOS, Android). It would amount to building a second sync mechanism for a part of the users.

3 Likes

In addition, on the computer version, you may enable “Automatically sync on profile open/close” in preferences > Network

Although I, too, only regularly use macOS and iOS devices, I would not use iCloud sync. I’m also a macOS and iOS developer; and will tell you that iCloud sync is notoriously bad. Even if it were enabled in Anki, I wouldn’t use it. Then there’s the very fraught issue of trying to synchronize a database file over a cloud service like this. There’s simply no way to ensure database integrity.

Finally, the synchronization process in Anki is world-class. Sync seems like one of those easy things to do. Trust me, it is not.

2 Likes