A working Objective-C implementation of the collaborative editing algorithm WithOut Operational Transform (WOOT). This example is ready to build and run as an iOS app using Apple Xcode.
WOOT is a framework that ensures intention consistency between multiple users' edits. Similar to collaborative editing without a central server.
Credits to G ́erald Oster, Pascal Urso, Pascal Molli, Abdessamad Imine. Real time group editors with- out Operational transformation. [Research Report] RR-5580, INRIA. 2005, pp.24. ]) WOOT research paper link
I used this implementation in Mesh Notes, a free iOS app that allows nearby users to collaborate on notes.
- Download, open Xcode project, and run.
- The
MainViewController
contains twoUITextViews
that receive each other's edit operations and process them.
- The
- This code was mostly copied from the finished version of Mesh Notes, my iOS app that uses this implementation of WOOT.
- The UITextView delegate methods are implemented in the
WOOTTextViewDelegate
class.- Cut, Copy, Paste operations are broken down into individual insert and delete operations.
- The project deployment target is set to iOS 9 because iOS 8 sends a different set of
NSRanges
toUITextViewDelegate
.
WString
class contains most of the WOOT logic.WCharacter+LocalPosition
andWCharacter+Special
are not actively needed to make the algorithm function. All references to them may be removed if desired.- You are free to modify and use the code in your projects.
Objective-C WithOut Operational Transform is made available under MIT License.