1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    59
    Answers
    2
    Vote Rating
    1
    arael78 is on a distinguished road

      1  

    Default Unanswered: sencha touch 2.1 and cordova 2.3.0; stuck on the loading screen on iOS based devices

    Unanswered: sencha touch 2.1 and cordova 2.3.0; stuck on the loading screen on iOS based devices


    Hi,

    when I try to load my application on ipad/iphone browser I get stuck on the loading screen.

    No warning/error messages are issued. The Ext.application launch method is not called but the script is loaded.

    This happens only when cordova-2.3.0.js is included inside index.html.

    Can anybody else confirm this?

  2. #2
    Sencha User
    Join Date
    Oct 2012
    Posts
    6
    Vote Rating
    1
    jhennard is on a distinguished road

      1  

    Default Experiencing the same.

    Experiencing the same.


    Not sure if this is helpful, but experiencing in the exact same issue on this end. Here's the error I'm receiving. Perhaps related to configuration, but no idea what's going on yet.

    TypeError: 'undefined' is not a function (evaluating 'cordova.require('cordova/exec').nativeEvalAndFetch(function(){cordova.fireDocumentEvent('resign');})')

    Using Safari web inspector to troubleshoot.

  3. #3
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Chisinau, Moldova
    Posts
    642
    Answers
    21
    Vote Rating
    25
    vadimv will become famous soon enough vadimv will become famous soon enough

      0  

    Default


    don't included it in index.html, but in app.json.

  4. #4
    Sencha User
    Join Date
    Aug 2011
    Posts
    36
    Answers
    4
    Vote Rating
    2
    bjudson is on a distinguished road

      0  

    Default Also having this problem

    Also having this problem


    Also having this problem. Posted a question on StackOverflow.

    The app will load in desktop browsers (at least Chrome and Safari for Mac). Also works in native (phonegap) wrapper.

    But all mobile browsers I've tried -- Mobile Safari (iOS 6 on iPhone and simulator), Chrome on iOS, browser on Android version 2.3 -- hang on the loading page, without launching the app. My cordova.js file is declared in app.json, not in index.html.

    One other note -- the Ext object is loaded (I think) fully, my app's namespace is loaded with all my views, controllers, models, and stores, but the app and config properties are not present.

    I'm using ST 2.1 and Cordova 2.3.0.

  5. #5
    Sencha User
    Join Date
    Aug 2011
    Posts
    36
    Answers
    4
    Vote Rating
    2
    bjudson is on a distinguished road

      1  

    Default


    Removing cordova.js reference from app.json solved my problem. Strange, because earlier versions of cordova would load fine alongside ST 2 in mobile browsers. Also strange that it works in desktop browsers.

    Is there a way to automate this for different builds? Like package would include cordova.js but production would not?

  6. #6
    Sencha Premium Member
    Join Date
    Mar 2013
    Posts
    9
    Vote Rating
    4
    tgolembiewski is on a distinguished road

      0  

    Default


    Quote Originally Posted by bjudson View Post
    Is there a way to automate this for different builds? Like package would include cordova.js but production would not?
    We just using to different index files... One for Cordova build and one for web. You can configure this in cordova config file..

  7. #7
    Sencha User emredagli's Avatar
    Join Date
    Jun 2008
    Posts
    301
    Vote Rating
    2
    emredagli is on a distinguished road

      0  

    Default


    I had simillar problem,
    Finially I found the reason for my case.

    It was related with bad usage of enums.
    I dont know from where I took the code but it was stated that enum definitions can be defined under app.js like:
    Code:
    Ext.application({
    ...
        enums: {
            SortOrder: {
                NewItem:5,
                NewDiscount:4,
                Discount:3,
                Normal:2,
                OutOfStock:1
            }
        },
    ...
    And I was used that enum under a view config like:

    Code:
    itemTpl:
          ...
          '<tpl if="StockStatus == ' + MyApp.app.enums.StockStatus.InStock + '">' +
          ...
    It was working on chrome without error.
    But when I test it on mobile device It was stucked on loading screen giving no error.

    I hope this info is helpfull.