Hybrid View

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    1
    Vote Rating
    0
    divineforge is on a distinguished road

      0  

    Default Unanswered: Combine Sencha Touch with iOS Native Application

    Unanswered: Combine Sencha Touch with iOS Native Application


    Hi, I'm looking at the situation where integration existing iOS native application with the sencha touch charting features.

    However, there are several challenges as below:
    by having a webview on the iOS native, and viewing the embedded HTML/javascript in the iOS native application, it's possible to show the chart, however, consider the following two issues arise:

    1- Interaction from Native code to Sencha Touch (Objective-C to Javascript/HTML5)
    how to update and sending data to the sencha touch chart? My thought is create a 'dynamic string of those HTMLs, and substitute the value part with variables, each time, updating the variable, update the value, and reload the webview in the iOS to show and update chart.

    2. Interaction from Sencha Touch to Native Code ? (Javascript/HTML trigger/callback the objective c code?)
    for an instance, click on the bar chart in the Sencha Touch, I would like to obtain the value of the bar that I clicked on, or some relevant information such as 'category', chart name, bar name, value.. etc.. what I could think of maybe using the Sencha Touch, 'write json' class to create any Json file, to be picked up and read by the objective-c native code part.. However, even with that, this is unable to trigger any function of the native code. thus.. any comment or suggestion on this hybrid approach development- native code to javascript/ html5 and vice-versa?

    appreciates, thanks..
    Last edited by divineforge; 24 Oct 2012 at 1:32 AM. Reason: formatting issue *

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,548
    Vote Rating
    872
    Answers
    3566
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    It sounds like you are overcomplicating your application. Either go with ST2 or stay native.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

Tags for this Thread