Syncing macOS and iOS via OneDrive

A lot of threads are dealing with options syncing Scrivener files between macOS and iOS, but I didn’t find really new posts dealing with the newest versions of macOS (10.15.5) and iOS (13.5) and, furthermore, the newest version of OneDrive. So I am asking here if syncing via OneDrive now is possible or even recommended. (I am using OneDrive extensively, and I don’t like Dropbox.)

Thanks in advance for any hints.

For the specific question about iOS, check my other response.

Literature & Latte has documented problems with Google Drive and OneDrive. Dropbox is the only cloud service Literature & Latte has provided for in its code to any extent, and it provides the only available automatic sync from other platforms to iOS Scrivener and back.

https://www.notion.so/deepspacecorps/L-L-Guidance-on-Cloud-Sync-a4954b2bbe574a43b4608fb9d61895ef

That doesn’t mean those services (or others) are unreliable today, necessarily. Likewise, Dropbox isn’t necessarily reliable on a given day. Cloud servers change, local sync applications change, operating systems change, etc. It’s impossible to test every change made by a 3rd party developer.

Any cloud service can do the job, if you know a few rules and follow them:

  1. Tell Scrivener to make a zip backup when it closes.
  2. Always know where your backups and projects are.
  3. Practice retrieving from a backup. If you don’t know how to do it, backups are useless.
  4. Notice immediately if something goes wrong.
  5. If that happens, stop. Do nothing until you have a plan. Panic never helps.
  6. Don’t open Scrivener over and over hoping it gets better on its own. That can overwrite the backups you need.
  7. Find the newest zip backup from before the glitch.
  8. Unzip it to a safe place and open that project. If it’s bad, go to step 7 for a slightly older backup.
  9. If you lost work in your last session, it may be retrievable. If it opens, you can open it side by side with the backup version and drag/drop material from the broken project to the backup project.
  10. When all that is done, the backup project is the new official, repaired project.
  11. Close and delete or rename the broken project.
  12. Put the repaired project where the broken one used to be. (You should have a dedicated location for all projects.)

If any of these steps are too much for you, get help.

Maybe the most important thing to know is this:

Don’t depend (at a life-or-death level) on anything to backup your projects. It’s nice if they do it properly, but that’s a bonus. Did you notice how necessary zip backups were in the steps above? That’s why you should backup your zip backups!

The good news? Any cloud service is likely to have no trouble backing up a zip file. Zip files are simple.

Personally, I keep projects and zip backups in Dropbox.

I also backup my hard drive to an external drive with Time Machine (Mac), and I backup everything but the operating system using ChronoSync. Belt and suspenders!

HTH.

Back to the more specific question re: iOS Scrivener.

OneDrive can’t be the sync service for iOS Scrivener, but it can be used anyway. You can connect to OneDrive in the iOS Files app and open Scrivener from there. When you’re done making changes, archive the project in OneDrive. Back on the laptop or desktop, retrieve the project from that backup. This works for any service the Files app understands.

Just to amplify on this response, the reason why you have to use the Files app to move your Scrivener projects back and forth between Scrivener and any other sync engine other than Dropbox is that iOS has much stricter security than desktop OS’s do. One of these security features is “sandboxing” – each app has its own restricted portion of the storage that it can read from and write to. If you download a Scrivener project onto your device with OneDrive, OneDrive writes it to its own area – and my application isn’t allowed to read in that area. Nor are most applications, except for a few trusted system applications. This is, in fact the entire function of the Files app – to be one of the few apps that can move files between app sandboxes.

Dropbox provides a detailed API for iOS programmers to use – one that is full-featured enough for KB to be able to integrate that functionality into Scrivener for iOS to safely sync projects with the Dropbox cloud servers. None of the other sync engines provide APIs with enough granularity for him to be able to sync the various project updates the correct way – so they are not used.