Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Aug 2011
    Location
    Brescia - Italy
    Posts
    102
    Vote Rating
    1
    tino7_03 is on a distinguished road

      0  

    Default [2.1.0] JSONP doesn't work in iOS package

    [2.1.0] JSONP doesn't work in iOS package


    I have used Ext.data.JsonP in my sencha 2.1.0 app and it works until I use it in browser. I'm using Sencha Architect and after iOS packaging when I try my app on device (or simulator) no data are loaded. I have changed using ajax and my app now works in iOS package also.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    34,128
    Vote Rating
    453
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Are you sure what you are returning is valid JSONP? I have a store that uses jsonp proxy that works.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    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 almost in print!

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

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Location
    Brescia - Italy
    Posts
    102
    Vote Rating
    1
    tino7_03 is on a distinguished road

      0  

    Default


    This function works in Chrome and doesn't works in iOS:
    PHP Code:
    getData: function(url,methodName,args,fnSuccessCallback,scope,timeout,waitMsgCmp,fnErrCallback) {


            if(
    timeout===undefined||timeout===null){
                
    timeout=3000;
            }
            if(
    waitMsgCmp===undefined||waitMsgCmp===null){
                
    waitMsgCmp=Ext.Viewport.xtype;
            }


            
    Ext.ComponentQuery.query(waitMsgCmp)[0].setMasked({ xtype:'loadmask',message'Attendere' });
            
    timeout=setTimeout(function(){Ext.ComponentQuery.query(waitMsgCmp)[0].setMasked(false);fnErrCallback();}, timeout);
            
    Ext.data.JsonP.request({
                 
    scope:scope,
                 
    urlurl,
                 
    params:{[
                 
    methodNamemethodName,
                 
    args:args,
                 
    time: new Date().getTime()
               },
               
    callbackKey'callback',
               
    callback: function (success,jsonData) {
                   
    Ext.ComponentQuery.query(waitMsgCmp)[0].setMasked(false);
                   
    clearTimeout(timeout);
                   
    fnSuccessCallback(jsonData,this);


               }
            });