-
4 Nov 2012 3:19 PM #11
Yes, I think the issue here is related to web-apps.
-
14 Nov 2012 11:38 AM #12
-
14 Dec 2012 2:00 PM #13
yes I have the same problem also on a production build - test works fine but production build doesnt.
I had to add my javascript file in the index.html as a script.
does anyone have a workaround? is this a known sencha issue?
thx
-
4 Feb 2013 8:54 PM #14
Same issue
Same issue
Also having this problem. If you use sencha app build package, everything works fine. With sencha app build production, external libraries are not available.
I'm using ST 2.1 with Cmd 3.0
-
6 Mar 2013 10:28 AM #15
Same Issue
Same Issue
Production build not loading external files and if I include them in index.html they are loaded too late.
-
6 Mar 2013 1:23 PM #16
Without knowing the specifics of your project, I imagine you could do this in a few ways:
(1) Manually copy the offending JS file (not a desirable solution)
(2) Automate this process by editing the Ant build used by Sencha Cmd (not a bad option)
(3) Edit your JS file so that it abides by the Sencha MVC pattern - meaning, use Ext.define() and then add it to the app.js "requires" block.
There's other solutions I could probably come up with, but those seem relatively easy to implement. Again, I don't know the specifics of anyone's project so my advice might change depending on other factors.
-
6 Mar 2013 1:56 PM #17
@arthurakay, the third option is what I used to solve my problem. I created a singleton object called Config like this
and I access it in my code like:Code:Ext.define('App.utils.Config', { singleton: true, alternateClassName: ['Config'], config: { api: { version: '1', platform: 'm' }, currency: { sign: '$', precision: 2 }, ... }, constructor: function(){ return this.config; } });
The file needs to be in added with requires config to be able to use it. The app.js file will do just fine:Code:var price = Config.currency.sign + 10;
Hope this helps.Code:requires: [ 'App.utils.Config' ]
-
25 Mar 2013 10:33 AM #18
This is an issue for us too. We are building Sencha Touch application and deploying on Andraid using PhoneGap/Cordova. We need to include the cordova-2.5.0.js in our app.
If we deploy the debug version everything is OK.
If try and buid a production version using Sencha Command 3.0 using app build production we run into problems.
We have the following configuration in our app.json file:
The cordova-2.5.0.js content is part of the minified app.js, but we cannot catch any of the cordova events, so I guess that code is not available.Code:"js": [ { "path": "touch/sencha-touch.js", "x-bootstrap": true }, { "path":"cordova-2.5.0.js" }, { "path": "app.js", "bundle": true, /* Indicates that all class dependencies are concatenated into this file when build */ "update": "delta" }
If we put js tag in the index.html:
then the deployed app hangs on loading - we cannot see the first page.Code:<scripttype="text/javascript"charset="utf-8"src="cordova-2.5.0.js"></script>
Modifying third party scripts to make them "sencha" compatible is not always possible due to third party licensing limitations.
Using PhoneGap wrapper for native HTML5 apps is very common. Does Sencha have any recommendations for developers using PhoneGap - which Sencha command option we can to use to build the production code and how to proceed in that case?
Is the problem in the microloader? Maybe if we don't use it revert back to Sencha Touch 1.x style, the problem will be solved?
-
25 Mar 2013 12:56 PM #19
-
26 Mar 2013 8:18 AM #20
pveleva,
regarding app hanging at blue screen. I'm on ST 2.1, Cordova 2.2.0, Sencha Cmd v3.1.0.239 , and a few months ago found a temporary fix, until I finish app developing: try to change microloader's code from index.html of the production build with the one from testing build. At that time was a problem in microloader, maybe still it is.My blog: http://vadimpopa.com


Reply With Quote
