Skip to content

Instantly share code, notes, and snippets.

@maltebucksch
Created June 26, 2018 08:06
Show Gist options
  • Save maltebucksch/3584285e90bdc966a2018738c7d19e80 to your computer and use it in GitHub Desktop.
Save maltebucksch/3584285e90bdc966a2018738c7d19e80 to your computer and use it in GitHub Desktop.
Realm Sync Service: handleUpdate
private static func handleUpdate(_ update: Update) {
update.insertions.forEach { upload($0, isUpdated: false) }
update.modifications.forEach { upload($0, isUpdated: true) }
update.deletions.forEach { deleteObject(withId: $0, ofType: update.type) }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment