1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    104
    Vote Rating
    0
    rbahumi is on a distinguished road

      0  

    Default Unanswered: PhoneGap object is not created in production build

    Unanswered: PhoneGap object is not created in production build


    Hi,

    I am using Sencha touch 2.0.1.1, and trying to combine Sencha with PhoneGap, on a production build (Apache on window 7).

    Running the application in dev mode (before running any build) works just fine, and the 'PhoneGap' object is created. The testing build also works. But, when trying to run the production build, the PhoneGap 'deviceready' event is never fired, and the PhoneGap object is never created. This has happened to me with the Android JS file (both cordova-2.1.0.js & cordova-2.2.0.js) on Chrome and Safari.

    In order to reproduce this described scenario, you can just create a new project with SenchaCMD, and add this to the app.json file:
    Code:
            {
                "path": "sdk/sencha-touch.js"
            },
        {
                "path": "cordova-2.1.0.js",
            /* also tried with:     "remote": true       */ 
            },
            {
                "path": "app.js",
                "bundle": true,  /* Indicates that all class dependencies are concatenated into this file when build */
                "update": "delta"
            }
    By the way, I was trying to download the new Sencha Touch and try that with Phonegap also, but the link seemed to be broken.

    Please advice,
    Roei.

  2. #2
    Sencha User
    Join Date
    Sep 2012
    Posts
    104
    Vote Rating
    0
    rbahumi is on a distinguished road

      0  

    Default


    I did find a workaround for this: adding the cordova.js (not the minified one) file manually to the production's index.html file.

    Code:
    <script id="microloader" type="text/javascript" src="sdk/microloader/development.js"></script>
    <script type="text/javascript" src="cordova-2.1.0.js"></script>
    This seems like a possible name collusion, although I don't see any error reported in the Chrome Dev console.


    UPDATE:
    This actually isn't a workaround, because it the indicator is stuck (Sencha's 3 dots do not disappear) on Android 2.3 with Eclipse. I am working with the 'testing' build again, which works just fine.

    Please advice.

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi