Objective-c/andriod to JavaScript brigde

You must Login before you can answer or comment on any questions.

I'm examining tools/frameworks which help me to build hybrid mobile application,we already have very wide model-control layer implemented in pure Javascript and are interested to write UI natively, for each platform with reusing the existing code written in JS.I see that the approach you provide a little bit different what I'm looking for, I'm not going to write the UI on JS, so the question if your dev platform can help me to simplify communication between native code and JS, so that I can write app with native iOS apps and heavy JavaScript usage.

Thanks a lot.

— asked 11 months ago by Denis Voloshin
1 Comment
  • Titanium is 100% JS. What are you using to create the UI? If you plan on using HTML and CSS, then maybe Titanium is not your platform of choice. In Titanium we use JS to call the native API of both Android and iOS. This is how we create the real native experience that other competitors lack.

    Also, one thing to note is that we are JS and use the Titanium API instead of the DOM API. This means that any attempt to call the DOM from Titanium code will fail (unless you use a webview which defeats the purpose of Titanium).

    — commented 11 months ago by Pedro Enrique

3 Answers

We are planing to use native iOS to create UI and call for JavaScript code where model-controller layer is already implemented, the layer contains network package which is based on ajax call to the server, if I understand right, since we have javascript object usage like XMLHttpRequest we can't use Titanium API.Button line our architecture a little bit different we need to call for JavaScript from Native code and return to native with the result. To evaluate the JavaScript code we need to load it into UIWebView and communicate with the object.

Denis, You can then go ahead with native module development approach, and then create whatever you want from native and implement your logic as you want. For module development approach you can refer this link.

Hi Denis, I don't understand your question properly, can you elaborate it little more and write your exact use case.

Your Answer

Think you can help? Login to answer this question!