owncloud / ios-sdk

📱 📦 iOS SDK for ownCloud
GNU General Public License v3.0
10 stars 8 forks source link

Offline mode #25

Open jesmrec opened 6 years ago

jesmrec commented 6 years ago

The sdk is ready to perform actions when device is offline, and perform them once the app gets online mode again. Sometimes, such behaviour can lead to a lack of sync of other problems related. I will describe some of them here.

Also, discussions about expected behaviour can be handled here

NOTE: Some of the issues can concern the app (@pablocarmu). They are reported here, so the offline mode is manly responsibility of the SDK.


jesmrec commented 6 years ago

(1) [FIXED]

App crashes by performing these steps:

  1. Go offline (plane mode)
  2. Delete a file -> file is not deleted, but a notification appears on the bottom
  3. Perform the same action in 2. (Delete the same file again)
  4. Go online -> Alert shown about changes in the file in server
  5. Delete any content

Current: App crashes and no more content can be deleted. Expected: Alert in 4. is not correct. All content correctly deleted.

jesmrec commented 6 years ago

(2)

Same action in server and app when app is online causes a conflict that the user has to fix. The action in the app is ignored:

  1. Go offline in the app
  2. In webUI, rename a item
  3. In app, rename the same item with a different name
  4. Go online

Current: The app shows an alert: "item not found". List is not refreshed automatically. When pulling down, the change in the webUI is fetched and updated, and the change in the app is ignored

Expected: User is asked for the version to keep.

jesmrec commented 6 years ago

(3) [FIXED]

https://github.com/owncloud/ios-app/pull/102#issuecomment-410218436

the operations seem to be queued. When the first one is executed (renamed), the source file does not have the same name, so the second action will not find such file.

jesmrec commented 6 years ago

(4) [FIXED]

  1. Go offline
  2. Drag&Drop a folder to another location (move)
  3. Repeat the same action (same source folder and same location) several times
  4. Go online

Current: action is performed once, correctly. Next time one item is moved (no matter which one), an error appears pointing to the actions that were not executed in offline mode. Error will be raised as many times as "move" actions were done.

Expected/Suggested: in offline mode, if the same operation (exactly the same) is performed more than one time in a row, it should be discarded to avoid such side-effects.

NOTE: Same effect with Duplicate action

jesmrec commented 5 years ago

(5) [FIXED]

files app related, rename items offline:

https://github.com/owncloud/ios-app/pull/67#issuecomment-440369524

jesmrec commented 5 years ago

(6) [FIXED]

Upload a file from photo library with no connection. From https://github.com/owncloud/ios-app/pull/146#issuecomment-440256852

jesmrec commented 5 years ago

(7) [FIXED]

Upload a file, and connection is lost in the middle, pointing to an error even though the upload success.

From https://github.com/owncloud/ios-app/pull/146#issuecomment-441019112