Sencha Touch Charts in WebView: Access local json file


in a project I am trying to load data as Json in a JsonStore for a SenchaTouch Chart. In the following code (a simple js file) I load the Json Data form a local File.

window.store1 = new{
    fields : ['name', 'data1'],
        proxy : {
            type : 'rest',
            url : 'data.json',
            reader : {
                type : 'json',
                root : 'data'

The js file is loaded in a webView.
If I simply call the js in a html file in the browser, it works.
If I try to load the data in my deployed Titanium Mobile App on the iOS Simulator no Data is loaded.

Is there a way to access the data.json file with Titanium?

An equal question was also asked in the Sencha Forum.


1 Answer

  • My guess? Its a path issue.
    Considering referencing the json file relative to its location in the Resource file.
    If it is in a subdirectory, then reference as url: '/my_directory/data.json'