Why is Scrivener iOS 'smarter' about changes than Scrivener macOS?

si
sidderke
Posts: 93
Joined: Thu Dec 03, 2015 11:34 pm
Platform: Mac

Mon Apr 23, 2018 11:14 am Post

Let me explain.

This was both the case with Scrivener 2 and with Scrivener 3.
If I open a project on Scrivener iOS (Dropbox), and I don't change anything... The system doesn't report changes. If I just open a couple of pd's and text files, and even if I open a text file, put the text cursor somewhere but I don't type anything and go back, Scrivener iOS doesn't tell me with the blue symbols that something changed and that I should sync.

If I do the same in Scrivener macOS, just open the project and close it back even, and I go back to Scrivener iOS, it says I have to sync again because the project changed.
It's not a big 'problem', although it does make for a lot of unnecessary syncs. That wouldn't be a big problem, but I still have the problem that was reported in a couple of threads here, where syncing on iOS takes a LOT longer with Scrivener 3 files then with Scrivener 2.8.

So I'm wondering, kind of out of curiosity: why is Scrivener iOS 'smarter' about a true change being made in a project, and is it in Scrivener macOS enough to just open and close it again for the system to say there is a change?
(I see this too in the Dropbox icon, just opening the project already makes the Dropbox icon 'busy')

User avatar
KB
Site Admin
Posts: 19667
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Mon Apr 23, 2018 4:09 pm Post

There is no Dropbox app for iOS, so I had to write all of the Dropbox syncing code myself using the Dropbox API. (The API does nothing automatically: I have to have Scrivener look for changes or tell Dropbox about them, and then work out which files to download and upload all in my own code. On macOS, Dropbox's app does all of that automatically.) So on iOS, I have coded it so that the sync code ignores minor UI changes. On macOS, there is no way of doing this, since the Dropbox app monitors all changes to files inside the .scriv package, and when you navigate or change the UI in any way, the UI settings file inside the project gets updated.

All the best,
Keith
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

Online
User avatar
AmberV
Posts: 21449
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Mon Apr 23, 2018 11:22 pm Post

(I see this too in the Dropbox icon, just opening the project already makes the Dropbox icon ‘busy’)


And in that case in particular, that’s a feature not a bug. :) Opening a project creates a “user.lock” file that is immediately propagated to all attached devices. The presence of this file is what generates the warning that a project appears open, on other Macs or PCs.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

si
sidderke
Posts: 93
Joined: Thu Dec 03, 2015 11:34 pm
Platform: Mac

Tue Apr 24, 2018 7:17 am Post

Thanks for the replies :)

Ho
Holohive
Posts: 3
Joined: Wed Jan 27, 2016 9:08 am
Platform: Mac

Fri May 18, 2018 11:24 am Post

KB wrote:There is no Dropbox app for iOS
How do you mean? I have Dropbox's app on my iPad. It's been out for months.

User avatar
lunk
Posts: 2262
Joined: Wed Aug 21, 2013 4:24 pm
Platform: Mac + iOS
Location: Sweden 64° N

Fri May 18, 2018 11:38 am Post

Holohive wrote:
KB wrote:There is no Dropbox app for iOS
How do you mean? I have Dropbox's app on my iPad. It's been out for months.

... no Dropbox app running in the background, discreetly updating any changes in the file system to the Dropbox server, like there is in OS X.
I am a user, writing non-fiction and science, using:
* Mac Scrivener 3 on a Macbook 12”, MacBook Pro 13”, and iMac 27”, all running the latest MacOS
* iOS Scrivener 1 on an iPhone 8, iPad Air 9.7”, and iPad Pro 12.9”, all running the latest iOS

User avatar
KB
Site Admin
Posts: 19667
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Fri May 18, 2018 2:38 pm Post

Holohive wrote:
KB wrote:There is no Dropbox app for iOS
How do you mean? I have Dropbox's app on my iPad. It's been out for months.


Yes, sorry, that was badly phrased. I should have said "no background Dropbox process". On macOS, you have the front-end Dropbox app, but that also installs a background process that runs all of the time and monitors both changes to the local Dropbox folder and changes to the Dropbox servers. Whenever it detects a change, it automatically syncs the two. On iOS, there's a Dropbox app that allows you to access your Dropbox files and download them, but there is no background process that syncs them to the local file system, since iOS doesn't work like that. So I had to use the Dropbox APIs (which provide functions for uploading, downloading and checking for changes) and write my own sync system from scratch for the iOS version.

All the best,
Keith
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."