I'm currently working on a project similar to google docs. Basically, it allows multiple users to edit word documents concurently in a web browser. I've been working extensively in pure javascript nodejs and socket.io. The web based text editor was written from scratch using HTML5, CSS and Javascript. I handled Operational Transformation(OT) with shareJS(server & client library that allows realtime editing).
The challenge I'm having now is with mobile development, where I typically want to develop for both android and iOS. I've been unsure about the right workflow and technical decisions to make. Below is what has been going through my mind:
How do I incorporate my javascript application into a native iOS/Android app? Should I just build an exact clone of what I have on the web from scratch? I mean build a replica of my web implementation in iOS(Swift)/Android(Java). Of course this would mean re-writing my text editor and OT scripts from scratch in the native language. Does that make sense?
I know of NativeScript and phonegap. But then, when it comes to mobile, I prefer leaning towards the native language. Is there a way to wrap my javascript into Swift/Android in order to call my javascript functions?
Have been thinkin about this for weeks now, pondering over how to go about this. I think i need suggestions, thoughts and advice from other frames of reference. Thanks in advance